home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
You can browse this item here: fsma.2.0.1.tar
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file ./, mode 700 , uid 23421 , gid 0 , size 0 , seconds 5277407222
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
100%
| lsar
| Tar
| default
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 2e 2f 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |./......|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 30 30 20 00 20 32 33 34 |.... 7|00 . 234|
|00000070| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 32 37 37 34 30 37 | 0 | 5277407|
|00000090| 32 32 32 20 20 20 34 31 | 36 36 00 20 00 00 00 00 |222 41|66. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 2e 2f 43 4f 50 59 52 49 | 47 48 54 00 00 00 00 00 |./COPYRI|GHT.....|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00000270| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00000280| 20 20 20 32 34 37 30 20 | 20 35 32 37 37 34 30 37 | 2470 | 5277407|
|00000290| 32 32 30 20 20 20 35 35 | 35 31 00 20 00 00 00 00 |220 55|51. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 54 68 69 73 20 73 6f 66 | 74 77 61 72 65 20 69 73 |This sof|tware is|
|00000410| 0a 0a 28 63 29 20 43 6f | 70 79 72 69 67 68 74 20 |..(c) Co|pyright |
|00000420| 31 39 39 32 20 62 79 20 | 50 61 6e 61 67 69 6f 74 |1992 by |Panagiot|
|00000430| 69 73 20 54 73 69 72 69 | 67 6f 74 69 73 0a 0a 54 |is Tsiri|gotis..T|
|00000440| 68 65 20 61 75 74 68 6f | 72 20 28 50 61 6e 61 67 |he autho|r (Panag|
|00000450| 69 6f 74 69 73 20 54 73 | 69 72 69 67 6f 74 69 73 |iotis Ts|irigotis|
|00000460| 29 20 67 72 61 6e 74 73 | 20 70 65 72 6d 69 73 73 |) grants| permiss|
|00000470| 69 6f 6e 20 74 6f 20 75 | 73 65 2c 20 63 6f 70 79 |ion to u|se, copy|
|00000480| 2c 0a 61 6e 64 20 64 69 | 73 74 72 69 62 75 74 65 |,.and di|stribute|
|00000490| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 20 61 | this so|ftware a|
|000004a0| 6e 64 20 69 74 73 20 64 | 6f 63 75 6d 65 6e 74 61 |nd its d|ocumenta|
|000004b0| 74 69 6f 6e 20 66 6f 72 | 20 61 6e 79 20 70 75 72 |tion for| any pur|
|000004c0| 70 6f 73 65 20 0a 61 6e | 64 20 77 69 74 68 6f 75 |pose .an|d withou|
|000004d0| 74 20 66 65 65 2c 20 70 | 72 6f 76 69 64 65 64 20 |t fee, p|rovided |
|000004e0| 74 68 61 74 20 74 68 65 | 20 61 62 6f 76 65 20 63 |that the| above c|
|000004f0| 6f 70 79 72 69 67 68 74 | 20 6e 6f 74 69 63 65 20 |opyright| notice |
|00000500| 65 78 74 61 6e 74 20 69 | 6e 0a 66 69 6c 65 73 20 |extant i|n.files |
|00000510| 69 6e 20 74 68 69 73 20 | 64 69 73 74 72 69 62 75 |in this |distribu|
|00000520| 74 69 6f 6e 20 69 73 20 | 6e 6f 74 20 72 65 6d 6f |tion is |not remo|
|00000530| 76 65 64 20 66 72 6f 6d | 20 66 69 6c 65 73 20 69 |ved from| files i|
|00000540| 6e 63 6c 75 64 65 64 20 | 69 6e 20 61 6e 79 0a 72 |ncluded |in any.r|
|00000550| 65 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 61 6e |edistrib|ution an|
|00000560| 64 20 74 68 61 74 20 74 | 68 69 73 20 63 6f 70 79 |d that t|his copy|
|00000570| 72 69 67 68 74 20 6e 6f | 74 69 63 65 20 69 73 20 |right no|tice is |
|00000580| 61 6c 73 6f 20 69 6e 63 | 6c 75 64 65 64 20 69 6e |also inc|luded in|
|00000590| 20 61 6e 79 20 0a 72 65 | 64 69 73 74 72 69 62 75 | any .re|distribu|
|000005a0| 74 69 6f 6e 2e 0a 0a 4d | 6f 64 69 66 69 63 61 74 |tion...M|odificat|
|000005b0| 69 6f 6e 73 20 74 6f 20 | 74 68 69 73 20 73 6f 66 |ions to |this sof|
|000005c0| 74 77 61 72 65 20 6d 61 | 79 20 62 65 20 64 69 73 |tware ma|y be dis|
|000005d0| 74 72 69 62 75 74 65 64 | 2c 20 65 69 74 68 65 72 |tributed|, either|
|000005e0| 20 62 79 20 64 69 73 74 | 72 69 62 75 74 69 6e 67 | by dist|ributing|
|000005f0| 0a 74 68 65 20 6d 6f 64 | 69 66 69 65 64 20 73 6f |.the mod|ified so|
|00000600| 66 74 77 61 72 65 20 6f | 72 20 62 79 20 64 69 73 |ftware o|r by dis|
|00000610| 74 72 69 62 75 74 69 6e | 67 20 70 61 74 63 68 65 |tributin|g patche|
|00000620| 73 20 74 6f 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |s to the| origina|
|00000630| 6c 20 73 6f 66 74 77 61 | 72 65 2c 0a 75 6e 64 65 |l softwa|re,.unde|
|00000640| 72 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |r the fo|llowing |
|00000650| 61 64 64 69 74 69 6f 6e | 61 6c 20 74 65 72 6d 73 |addition|al terms|
|00000660| 3a 0a 0a 31 2e 20 54 68 | 65 20 76 65 72 73 69 6f |:..1. Th|e versio|
|00000670| 6e 20 6e 75 6d 62 65 72 | 20 77 69 6c 6c 20 62 65 |n number| will be|
|00000680| 20 6d 6f 64 69 66 69 65 | 64 20 61 73 20 66 6f 6c | modifie|d as fol|
|00000690| 6c 6f 77 73 3a 0a 20 20 | 20 20 20 20 61 2e 20 54 |lows:. | a. T|
|000006a0| 68 65 20 66 69 72 73 74 | 20 33 20 63 6f 6d 70 6f |he first| 3 compo|
|000006b0| 6e 65 6e 74 73 20 6f 66 | 20 74 68 65 20 76 65 72 |nents of| the ver|
|000006c0| 73 69 6f 6e 20 6e 75 6d | 62 65 72 0a 20 20 20 20 |sion num|ber. |
|000006d0| 20 20 20 20 20 28 69 2e | 65 20 3c 6e 75 6d 62 65 | (i.|e <numbe|
|000006e0| 72 3e 2e 3c 6e 75 6d 62 | 65 72 3e 2e 3c 6e 75 6d |r>.<numb|er>.<num|
|000006f0| 62 65 72 3e 29 20 77 69 | 6c 6c 20 72 65 6d 61 69 |ber>) wi|ll remai|
|00000700| 6e 20 75 6e 63 68 61 6e | 67 65 64 2e 0a 20 20 20 |n unchan|ged.. |
|00000710| 20 20 20 62 2e 20 41 20 | 6e 65 77 20 63 6f 6d 70 | b. A |new comp|
|00000720| 6f 6e 65 6e 74 20 77 69 | 6c 6c 20 62 65 20 61 70 |onent wi|ll be ap|
|00000730| 70 65 6e 64 65 64 20 74 | 6f 20 74 68 65 20 76 65 |pended t|o the ve|
|00000740| 72 73 69 6f 6e 20 6e 75 | 6d 62 65 72 20 74 6f 20 |rsion nu|mber to |
|00000750| 69 6e 64 69 63 61 74 65 | 0a 20 20 20 20 20 20 20 |indicate|. |
|00000760| 20 20 74 68 65 20 6d 6f | 64 69 66 69 63 61 74 69 | the mo|dificati|
|00000770| 6f 6e 20 6c 65 76 65 6c | 2e 20 54 68 65 20 66 6f |on level|. The fo|
|00000780| 72 6d 20 6f 66 20 74 68 | 69 73 20 63 6f 6d 70 6f |rm of th|is compo|
|00000790| 6e 65 6e 74 20 69 73 20 | 75 70 20 74 6f 20 74 68 |nent is |up to th|
|000007a0| 65 20 0a 20 20 20 20 20 | 20 20 20 20 61 75 74 68 |e . | auth|
|000007b0| 6f 72 20 6f 66 20 74 68 | 65 20 6d 6f 64 69 66 69 |or of th|e modifi|
|000007c0| 63 61 74 69 6f 6e 73 2e | 0a 0a 32 2e 20 54 68 65 |cations.|..2. The|
|000007d0| 20 61 75 74 68 6f 72 20 | 6f 66 20 74 68 65 20 6d | author |of the m|
|000007e0| 6f 64 69 66 69 63 61 74 | 69 6f 6e 73 20 77 69 6c |odificat|ions wil|
|000007f0| 6c 20 69 6e 63 6c 75 64 | 65 20 68 69 73 2f 68 65 |l includ|e his/he|
|00000800| 72 20 6e 61 6d 65 20 62 | 79 20 61 70 70 65 6e 64 |r name b|y append|
|00000810| 69 6e 67 20 69 74 20 0a | 20 20 20 61 6c 6f 6e 67 |ing it .| along|
|00000820| 20 77 69 74 68 20 74 68 | 65 20 6e 65 77 20 76 65 | with th|e new ve|
|00000830| 72 73 69 6f 6e 20 6e 75 | 6d 62 65 72 20 74 6f 20 |rsion nu|mber to |
|00000840| 74 68 69 73 20 66 69 6c | 65 20 61 6e 64 20 77 69 |this fil|e and wi|
|00000850| 6c 6c 20 62 65 20 72 65 | 73 70 6f 6e 73 69 62 6c |ll be re|sponsibl|
|00000860| 65 20 66 6f 72 20 0a 20 | 20 20 61 6e 79 20 77 72 |e for . | any wr|
|00000870| 6f 6e 67 20 62 65 68 61 | 76 69 6f 72 20 6f 66 20 |ong beha|vior of |
|00000880| 74 68 65 20 6d 6f 64 69 | 66 69 65 64 20 73 6f 66 |the modi|fied sof|
|00000890| 74 77 61 72 65 2e 0a 0a | 54 68 65 20 61 75 74 68 |tware...|The auth|
|000008a0| 6f 72 20 6d 61 6b 65 73 | 20 6e 6f 20 72 65 70 72 |or makes| no repr|
|000008b0| 65 73 65 6e 74 61 74 69 | 6f 6e 73 20 61 62 6f 75 |esentati|ons abou|
|000008c0| 74 20 74 68 65 20 73 75 | 69 74 61 62 69 6c 69 74 |t the su|itabilit|
|000008d0| 79 20 6f 66 20 74 68 69 | 73 20 0a 73 6f 66 74 77 |y of thi|s .softw|
|000008e0| 61 72 65 20 66 6f 72 20 | 61 6e 79 20 70 75 72 70 |are for |any purp|
|000008f0| 6f 73 65 2e 20 20 49 74 | 20 69 73 20 70 72 6f 76 |ose. It| is prov|
|00000900| 69 64 65 64 20 22 61 73 | 20 69 73 22 20 77 69 74 |ided "as| is" wit|
|00000910| 68 6f 75 74 20 61 6e 79 | 20 65 78 70 72 65 73 73 |hout any| express|
|00000920| 20 0a 6f 72 20 69 6d 70 | 6c 69 65 64 20 77 61 72 | .or imp|lied war|
|00000930| 72 61 6e 74 79 2e 0a 0a | 00 00 00 00 00 00 00 00 |ranty...|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 2e 2f 4d 61 6b 65 66 69 | 6c 65 00 00 00 00 00 00 |./Makefi|le......|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00000a70| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00000a80| 20 20 20 36 35 36 31 20 | 20 35 32 37 37 34 30 37 | 6561 | 5277407|
|00000a90| 32 32 31 20 20 20 35 37 | 32 34 00 20 00 00 00 00 |221 57|24. ....|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 23 20 28 63 29 20 43 6f | 70 79 72 69 67 68 74 20 |# (c) Co|pyright |
|00000c10| 31 39 39 32 20 62 79 20 | 50 61 6e 61 67 69 6f 74 |1992 by |Panagiot|
|00000c20| 69 73 20 54 73 69 72 69 | 67 6f 74 69 73 0a 23 20 |is Tsiri|gotis.# |
|00000c30| 41 6c 6c 20 72 69 67 68 | 74 73 20 72 65 73 65 72 |All righ|ts reser|
|00000c40| 76 65 64 2e 20 20 54 68 | 65 20 66 69 6c 65 20 6e |ved. Th|e file n|
|00000c50| 61 6d 65 64 20 43 4f 50 | 59 52 49 47 48 54 20 73 |amed COP|YRIGHT s|
|00000c60| 70 65 63 69 66 69 65 73 | 20 74 68 65 20 74 65 72 |pecifies| the ter|
|00000c70| 6d 73 20 0a 23 20 61 6e | 64 20 63 6f 6e 64 69 74 |ms .# an|d condit|
|00000c80| 69 6f 6e 73 20 66 6f 72 | 20 72 65 64 69 73 74 72 |ions for| redistr|
|00000c90| 69 62 75 74 69 6f 6e 2e | 0a 0a 23 0a 23 20 24 49 |ibution.|..#.# $I|
|00000ca0| 64 3a 20 4d 61 6b 65 66 | 69 6c 65 2c 76 20 35 2e |d: Makef|ile,v 5.|
|00000cb0| 35 20 31 39 39 32 2f 31 | 31 2f 30 36 20 30 32 3a |5 1992/1|1/06 02:|
|00000cc0| 30 38 3a 32 30 20 70 61 | 6e 6f 73 20 45 78 70 20 |08:20 pa|nos Exp |
|00000cd0| 24 0a 23 0a 23 20 42 61 | 73 65 64 20 6f 6e 20 4c |$.#.# Ba|sed on L|
|00000ce0| 69 62 72 61 72 79 20 6d | 61 6b 65 66 69 6c 65 20 |ibrary m|akefile |
|00000cf0| 74 65 6d 70 6c 61 74 65 | 3a 20 2a 52 65 76 69 73 |template|: *Revis|
|00000d00| 69 6f 6e 3a 20 31 2e 31 | 35 20 2a 0a 23 0a 0a 23 |ion: 1.1|5 *.#..#|
|00000d10| 20 0a 23 20 41 76 61 69 | 6c 61 62 6c 65 20 65 6e | .# Avai|lable en|
|00000d20| 74 72 69 65 73 3a 0a 23 | 20 09 09 6c 69 62 20 09 |tries:.#| ..lib .|
|00000d30| 09 09 2d 2d 3e 20 63 72 | 65 61 74 65 73 20 74 68 |..--> cr|eates th|
|00000d40| 65 20 6c 69 62 72 61 72 | 79 0a 23 09 09 69 6e 73 |e librar|y.#..ins|
|00000d50| 74 61 6c 6c 09 09 2d 2d | 3e 20 69 6e 73 74 61 6c |tall..--|> instal|
|00000d60| 6c 73 20 74 68 65 20 6c | 69 62 72 61 72 79 20 28 |ls the l|ibrary (|
|00000d70| 61 72 63 68 69 76 65 2c | 20 6d 61 6e 20 70 61 67 |archive,| man pag|
|00000d80| 65 28 73 29 2c 20 68 65 | 61 64 65 72 28 73 29 29 |e(s), he|ader(s))|
|00000d90| 0a 23 09 09 75 6e 69 6e | 73 74 61 6c 6c 09 2d 2d |.#..unin|stall.--|
|00000da0| 3e 20 75 6e 69 6e 73 74 | 61 6c 6c 20 74 68 65 20 |> uninst|all the |
|00000db0| 6c 69 62 72 61 72 79 0a | 23 09 09 63 6c 65 61 6e |library.|#..clean|
|00000dc0| 09 09 09 2d 2d 3e 20 72 | 65 6d 6f 76 65 73 20 61 |...--> r|emoves a|
|00000dd0| 6c 6c 20 2e 6f 20 61 6e | 64 20 2e 61 20 66 69 6c |ll .o an|d .a fil|
|00000de0| 65 73 0a 23 09 09 73 70 | 6f 74 6c 65 73 73 09 09 |es.#..sp|otless..|
|00000df0| 2d 2d 3e 20 63 6c 65 61 | 6e 20 2b 20 75 6e 69 6e |--> clea|n + unin|
|00000e00| 73 74 61 6c 6c 0a 23 20 | 09 09 6c 69 6e 74 09 09 |stall.# |..lint..|
|00000e10| 09 2d 2d 3e 20 6c 69 6e | 74 73 20 61 20 66 69 6c |.--> lin|ts a fil|
|00000e20| 65 20 28 75 73 61 67 65 | 3a 20 6d 61 6b 65 20 6c |e (usage|: make l|
|00000e30| 69 6e 74 20 4d 4f 44 55 | 4c 45 3d 66 6f 6f 2e 63 |int MODU|LE=foo.c|
|00000e40| 29 0a 23 09 09 74 61 67 | 73 09 09 09 2d 2d 3e 20 |).#..tag|s...--> |
|00000e50| 63 72 65 61 74 65 73 20 | 61 20 74 61 67 73 20 66 |creates |a tags f|
|00000e60| 69 6c 65 20 28 66 72 6f | 6d 20 74 68 65 20 53 4f |ile (fro|m the SO|
|00000e70| 55 52 43 45 53 20 61 6e | 64 20 48 45 41 44 45 52 |URCES an|d HEADER|
|00000e80| 53 29 0a 23 09 09 63 68 | 65 63 6b 6f 75 74 20 09 |S).#..ch|eckout .|
|00000e90| 2d 2d 3e 20 63 68 65 63 | 6b 6f 75 74 20 61 6c 6c |--> chec|kout all|
|00000ea0| 20 66 69 6c 65 73 0a 23 | 09 09 64 69 73 74 09 09 | files.#|..dist..|
|00000eb0| 09 2d 2d 3e 20 64 69 73 | 74 72 69 62 75 74 69 6f |.--> dis|tributio|
|00000ec0| 6e 20 73 75 70 70 6f 72 | 74 0a 23 0a 0a 4e 41 4d |n suppor|t.#..NAM|
|00000ed0| 45 09 09 09 09 3d 20 66 | 73 6d 61 0a 56 45 52 53 |E....= f|sma.VERS|
|00000ee0| 49 4f 4e 09 09 09 3d 20 | 32 2e 30 2e 31 0a 0a 48 |ION...= |2.0.1..H|
|00000ef0| 45 41 44 45 52 53 09 09 | 09 3d 20 66 73 6d 61 2e |EADERS..|.= fsma.|
|00000f00| 68 20 69 6d 70 6c 2e 68 | 0a 53 4f 55 52 43 45 53 |h impl.h|.SOURCES|
|00000f10| 09 09 09 3d 20 66 73 6d | 61 2e 63 0a 4f 42 4a 45 |...= fsm|a.c.OBJE|
|00000f20| 43 54 53 09 09 09 3d 20 | 66 73 6d 61 2e 6f 0a 0a |CTS...= |fsma.o..|
|00000f30| 4d 41 4e 46 49 4c 45 53 | 09 09 09 3d 20 66 73 6d |MANFILES|...= fsm|
|00000f40| 61 2e 33 0a 49 4e 43 4c | 55 44 45 46 49 4c 45 53 |a.3.INCL|UDEFILES|
|00000f50| 09 3d 20 66 73 6d 61 2e | 68 0a 0a 23 20 54 68 65 |.= fsma.|h..# The|
|00000f60| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 76 61 72 69 61 | followi|ng varia|
|00000f70| 62 6c 65 73 20 61 72 65 | 20 75 73 65 64 20 62 79 |bles are| used by|
|00000f80| 20 74 68 65 20 27 69 6e | 73 74 61 6c 6c 27 20 65 | the 'in|stall' e|
|00000f90| 6e 74 72 79 20 61 6e 64 | 0a 23 20 73 68 6f 75 6c |ntry and|.# shoul|
|00000fa0| 64 20 62 65 20 63 75 73 | 74 6f 6d 69 7a 65 64 3a |d be cus|tomized:|
|00000fb0| 0a 23 20 20 20 20 20 4c | 49 42 44 49 52 3a 20 20 |.# L|IBDIR: |
|00000fc0| 20 20 20 77 68 65 72 65 | 20 74 68 65 20 6c 69 62 | where| the lib|
|00000fd0| 72 61 72 79 20 77 69 6c | 6c 20 62 65 20 70 6c 61 |rary wil|l be pla|
|00000fe0| 63 65 64 0a 23 20 20 20 | 20 20 49 4e 43 55 44 45 |ced.# | INCUDE|
|00000ff0| 44 49 52 3a 20 20 77 68 | 65 72 65 20 74 68 65 20 |DIR: wh|ere the |
|00001000| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 20 77 69 |include |files wi|
|00001010| 6c 6c 20 62 65 20 70 6c | 61 63 65 64 0a 23 20 20 |ll be pl|aced.# |
|00001020| 20 20 20 4d 41 4e 44 49 | 52 3a 20 20 20 20 20 77 | MANDI|R: w|
|00001030| 68 65 72 65 20 74 68 65 | 20 6d 61 6e 20 70 61 67 |here the| man pag|
|00001040| 65 73 20 77 69 6c 6c 20 | 62 65 20 70 6c 61 63 65 |es will |be place|
|00001050| 64 0a 23 0a 4c 49 42 44 | 49 52 09 09 09 3d 20 24 |d.#.LIBD|IR...= $|
|00001060| 28 48 4f 4d 45 29 2f 2e | 6c 69 6e 6b 73 2f 6c 69 |(HOME)/.|links/li|
|00001070| 62 72 61 72 69 65 73 2f | 24 28 41 52 43 48 29 0a |braries/|$(ARCH).|
|00001080| 4d 41 4e 44 49 52 09 09 | 09 3d 20 24 28 48 4f 4d |MANDIR..|.= $(HOM|
|00001090| 45 29 2f 2e 6c 69 6e 6b | 73 2f 6d 61 6e 70 61 67 |E)/.link|s/manpag|
|000010a0| 65 73 2f 6d 61 6e 33 0a | 49 4e 43 4c 55 44 45 44 |es/man3.|INCLUDED|
|000010b0| 49 52 09 09 3d 20 24 28 | 48 4f 4d 45 29 2f 2e 6c |IR..= $(|HOME)/.l|
|000010c0| 69 6e 6b 73 2f 69 6e 63 | 6c 75 64 65 73 0a 0a 44 |inks/inc|ludes..D|
|000010d0| 45 46 53 09 09 09 09 3d | 09 09 09 09 23 20 75 73 |EFS....=|....# us|
|000010e0| 65 64 20 66 6f 72 20 63 | 6f 6d 6d 61 6e 64 20 6c |ed for c|ommand l|
|000010f0| 69 6e 65 20 64 65 66 69 | 6e 65 64 20 66 6c 61 67 |ine defi|ned flag|
|00001100| 73 0a 44 45 42 55 47 09 | 09 09 09 3d 20 2d 67 09 |s.DEBUG.|...= -g.|
|00001110| 09 09 09 23 20 2d 67 20 | 6f 72 20 2d 4f 0a 56 45 |...# -g |or -O.VE|
|00001120| 52 53 49 4f 4e 5f 44 45 | 46 09 09 3d 20 2d 44 56 |RSION_DE|F..= -DV|
|00001130| 45 52 53 49 4f 4e 3d 5c | 22 46 53 4d 41 5c 20 56 |ERSION=\|"FSMA\ V|
|00001140| 65 72 73 69 6f 6e 5c 20 | 24 28 56 45 52 53 49 4f |ersion\ |$(VERSIO|
|00001150| 4e 29 5c 22 0a 0a 43 50 | 50 5f 44 45 46 53 09 09 |N)\"..CP|P_DEFS..|
|00001160| 09 3d 20 24 28 56 45 52 | 53 49 4f 4e 5f 44 45 46 |.= $(VER|SION_DEF|
|00001170| 29 20 24 28 44 45 46 53 | 29 0a 0a 23 0a 23 20 54 |) $(DEFS|)..#.# T|
|00001180| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 76 61 72 |he follo|wing var|
|00001190| 69 61 62 6c 65 73 20 73 | 68 6f 75 6c 64 6e 27 74 |iables s|houldn't|
|000011a0| 20 6e 65 65 64 20 74 6f | 20 62 65 20 63 68 61 6e | need to| be chan|
|000011b0| 67 65 64 0a 23 0a 4c 49 | 4e 54 5f 46 4c 41 47 53 |ged.#.LI|NT_FLAGS|
|000011c0| 09 09 3d 20 2d 68 62 75 | 78 0a 43 50 50 5f 46 4c |..= -hbu|x.CPP_FL|
|000011d0| 41 47 53 09 09 3d 20 24 | 28 43 50 50 5f 44 45 46 |AGS..= $|(CPP_DEF|
|000011e0| 53 29 0a 43 43 5f 46 4c | 41 47 53 09 09 09 3d 20 |S).CC_FL|AGS...= |
|000011f0| 24 28 44 45 42 55 47 29 | 0a 43 46 4c 41 47 53 09 |$(DEBUG)|.CFLAGS.|
|00001200| 09 09 3d 20 24 28 43 50 | 50 5f 46 4c 41 47 53 29 |..= $(CP|P_FLAGS)|
|00001210| 20 24 28 43 43 5f 46 4c | 41 47 53 29 0a 0a 49 4e | $(CC_FL|AGS)..IN|
|00001220| 53 54 41 4c 4c 09 09 09 | 3d 20 69 6e 73 74 61 6c |STALL...|= instal|
|00001230| 6c 20 2d 63 0a 46 4d 4f | 44 45 09 09 09 09 3d 20 |l -c.FMO|DE....= |
|00001240| 2d 6d 20 36 34 30 09 09 | 09 23 20 75 73 65 64 20 |-m 640..|.# used |
|00001250| 62 79 20 69 6e 73 74 61 | 6c 6c 0a 52 41 4e 4c 49 |by insta|ll.RANLI|
|00001260| 42 09 09 09 3d 20 72 61 | 6e 6c 69 62 0a 0a 50 41 |B...= ra|nlib..PA|
|00001270| 47 45 52 09 09 09 09 3d | 20 6c 65 73 73 0a 0a 0a |GER....=| less...|
|00001280| 4c 49 42 4e 41 4d 45 09 | 09 09 3d 20 6c 69 62 24 |LIBNAME.|..= lib$|
|00001290| 28 4e 41 4d 45 29 2e 61 | 0a 0a 6c 69 62 3a 20 24 |(NAME).a|..lib: $|
|000012a0| 28 4c 49 42 4e 41 4d 45 | 29 0a 0a 6c 69 62 6f 70 |(LIBNAME|)..libop|
|000012b0| 74 3a 20 63 6c 65 61 6e | 0a 09 6d 61 6b 65 20 44 |t: clean|..make D|
|000012c0| 45 42 55 47 3d 2d 4f 20 | 6c 69 62 0a 09 24 28 49 |EBUG=-O |lib..$(I|
|000012d0| 4e 53 54 41 4c 4c 29 20 | 24 28 46 4d 4f 44 45 29 |NSTALL) |$(FMODE)|
|000012e0| 20 24 28 4c 49 42 4e 41 | 4d 45 29 20 24 28 4c 49 | $(LIBNA|ME) $(LI|
|000012f0| 42 44 49 52 29 2f 6f 70 | 74 69 6d 69 7a 65 64 0a |BDIR)/op|timized.|
|00001300| 0a 24 28 4c 49 42 4e 41 | 4d 45 29 3a 20 24 28 4f |.$(LIBNA|ME): $(O|
|00001310| 42 4a 45 43 54 53 29 0a | 09 61 72 20 72 20 24 40 |BJECTS).|.ar r $@|
|00001320| 20 24 3f 0a 09 24 28 52 | 41 4e 4c 49 42 29 20 24 | $?..$(R|ANLIB) $|
|00001330| 40 0a 0a 6c 69 6e 74 3a | 0a 09 6c 69 6e 74 20 24 |@..lint:|..lint $|
|00001340| 28 43 50 50 5f 46 4c 41 | 47 53 29 20 24 28 4c 49 |(CPP_FLA|GS) $(LI|
|00001350| 4e 54 5f 46 4c 41 47 53 | 29 20 24 28 4d 4f 44 55 |NT_FLAGS|) $(MODU|
|00001360| 4c 45 29 20 32 3e 26 31 | 20 7c 20 24 28 50 41 47 |LE) 2>&1| | $(PAG|
|00001370| 45 52 29 0a 0a 69 6e 73 | 74 61 6c 6c 3a 20 24 28 |ER)..ins|tall: $(|
|00001380| 4c 49 42 4e 41 4d 45 29 | 0a 09 40 69 66 20 74 65 |LIBNAME)|..@if te|
|00001390| 73 74 20 22 24 28 4c 49 | 42 44 49 52 29 22 20 2d |st "$(LI|BDIR)" -|
|000013a0| 61 20 22 24 28 49 4e 43 | 4c 55 44 45 44 49 52 29 |a "$(INC|LUDEDIR)|
|000013b0| 22 20 2d 61 20 22 24 28 | 4d 41 4e 44 49 52 29 22 |" -a "$(|MANDIR)"|
|000013c0| 20 3b 5c 0a 09 74 68 65 | 6e 20 5c 0a 09 09 24 28 | ;\..the|n \...$(|
|000013d0| 49 4e 53 54 41 4c 4c 29 | 20 24 28 46 4d 4f 44 45 |INSTALL)| $(FMODE|
|000013e0| 29 20 24 28 4c 49 42 4e | 41 4d 45 29 20 24 28 4c |) $(LIBN|AME) $(L|
|000013f0| 49 42 44 49 52 29 20 3b | 5c 0a 09 09 65 63 68 6f |IBDIR) ;|\...echo|
|00001400| 20 22 49 6e 73 74 61 6c | 6c 65 64 20 24 28 4c 49 | "Instal|led $(LI|
|00001410| 42 4e 41 4d 45 29 20 74 | 6f 20 24 28 4c 49 42 44 |BNAME) t|o $(LIBD|
|00001420| 49 52 29 22 20 3b 5c 0a | 09 09 66 6f 72 20 69 20 |IR)" ;\.|..for i |
|00001430| 69 6e 20 24 28 49 4e 43 | 4c 55 44 45 46 49 4c 45 |in $(INC|LUDEFILE|
|00001440| 53 29 3b 20 64 6f 20 24 | 28 49 4e 53 54 41 4c 4c |S); do $|(INSTALL|
|00001450| 29 20 24 28 46 4d 4f 44 | 45 29 20 24 24 69 20 24 |) $(FMOD|E) $$i $|
|00001460| 28 49 4e 43 4c 55 44 45 | 44 49 52 29 20 3b 20 64 |(INCLUDE|DIR) ; d|
|00001470| 6f 6e 65 20 3b 5c 0a 09 | 09 65 63 68 6f 20 49 6e |one ;\..|.echo In|
|00001480| 73 74 61 6c 6c 65 64 20 | 24 28 49 4e 43 4c 55 44 |stalled |$(INCLUD|
|00001490| 45 46 49 4c 45 53 29 20 | 74 6f 20 24 28 49 4e 43 |EFILES) |to $(INC|
|000014a0| 4c 55 44 45 44 49 52 29 | 20 3b 5c 0a 09 09 66 6f |LUDEDIR)| ;\...fo|
|000014b0| 72 20 69 20 69 6e 20 24 | 28 4d 41 4e 46 49 4c 45 |r i in $|(MANFILE|
|000014c0| 53 29 20 3b 20 64 6f 20 | 24 28 49 4e 53 54 41 4c |S) ; do |$(INSTAL|
|000014d0| 4c 29 20 24 28 46 4d 4f | 44 45 29 20 24 24 69 20 |L) $(FMO|DE) $$i |
|000014e0| 24 28 4d 41 4e 44 49 52 | 29 20 3b 20 64 6f 6e 65 |$(MANDIR|) ; done|
|000014f0| 20 3b 5c 0a 09 09 65 63 | 68 6f 20 49 6e 73 74 61 | ;\...ec|ho Insta|
|00001500| 6c 6c 65 64 20 24 28 4d | 41 4e 46 49 4c 45 53 29 |lled $(M|ANFILES)|
|00001510| 20 74 6f 20 24 28 4d 41 | 4e 44 49 52 29 20 3b 5c | to $(MA|NDIR) ;\|
|00001520| 0a 09 65 6c 73 65 20 5c | 0a 09 09 65 63 68 6f 20 |..else \|...echo |
|00001530| 22 59 6f 75 20 66 6f 72 | 67 6f 74 20 74 6f 20 73 |"You for|got to s|
|00001540| 65 74 20 6f 6e 65 20 6f | 66 20 74 68 65 20 66 6f |et one o|f the fo|
|00001550| 6c 6c 6f 77 69 6e 67 20 | 76 61 72 69 61 62 6c 65 |llowing |variable|
|00001560| 73 3a 20 4c 49 42 44 49 | 52 2c 49 4e 43 4c 55 44 |s: LIBDI|R,INCLUD|
|00001570| 45 44 49 52 2c 4d 41 4e | 44 49 52 22 20 3b 5c 0a |EDIR,MAN|DIR" ;\.|
|00001580| 09 66 69 0a 0a 75 6e 69 | 6e 73 74 61 6c 6c 3a 0a |.fi..uni|nstall:.|
|00001590| 09 61 3d 60 70 77 64 60 | 20 3b 20 63 64 20 24 28 |.a=`pwd`| ; cd $(|
|000015a0| 49 4e 43 4c 55 44 45 44 | 49 52 29 20 3b 5c 0a 09 |INCLUDED|IR) ;\..|
|000015b0| 69 66 20 74 65 73 74 20 | 24 24 61 20 21 3d 20 60 |if test |$$a != `|
|000015c0| 70 77 64 60 20 3b 20 74 | 68 65 6e 20 72 6d 20 2d |pwd` ; t|hen rm -|
|000015d0| 66 20 24 28 49 4e 43 4c | 55 44 45 46 49 4c 45 53 |f $(INCL|UDEFILES|
|000015e0| 29 20 3b 20 66 69 0a 09 | 61 3d 60 70 77 64 60 20 |) ; fi..|a=`pwd` |
|000015f0| 3b 20 63 64 20 24 28 4c | 49 42 44 49 52 29 20 3b |; cd $(L|IBDIR) ;|
|00001600| 5c 0a 09 69 66 20 74 65 | 73 74 20 24 24 61 20 21 |\..if te|st $$a !|
|00001610| 3d 20 60 70 77 64 60 20 | 3b 20 74 68 65 6e 20 72 |= `pwd` |; then r|
|00001620| 6d 20 2d 66 20 24 28 4c | 49 42 4e 41 4d 45 29 20 |m -f $(L|IBNAME) |
|00001630| 3b 20 66 69 0a 09 61 3d | 60 70 77 64 60 20 3b 20 |; fi..a=|`pwd` ; |
|00001640| 63 64 20 24 28 4d 41 4e | 44 49 52 29 20 3b 5c 0a |cd $(MAN|DIR) ;\.|
|00001650| 09 69 66 20 74 65 73 74 | 20 24 24 61 20 21 3d 20 |.if test| $$a != |
|00001660| 60 70 77 64 60 20 3b 20 | 74 68 65 6e 20 72 6d 20 |`pwd` ; |then rm |
|00001670| 2d 66 20 24 28 4d 41 4e | 46 49 4c 45 53 29 20 3b |-f $(MAN|FILES) ;|
|00001680| 20 66 69 0a 0a 63 6c 65 | 61 6e 3a 0a 09 72 6d 20 | fi..cle|an:..rm |
|00001690| 2d 66 20 24 28 4f 42 4a | 45 43 54 53 29 20 24 28 |-f $(OBJ|ECTS) $(|
|000016a0| 4c 49 42 4e 41 4d 45 29 | 20 63 6f 72 65 0a 0a 73 |LIBNAME)| core..s|
|000016b0| 70 6f 74 6c 65 73 73 3a | 20 63 6c 65 61 6e 20 75 |potless:| clean u|
|000016c0| 6e 69 6e 73 74 61 6c 6c | 0a 0a 74 61 67 73 3a 20 |ninstall|..tags: |
|000016d0| 24 28 53 4f 55 52 43 45 | 53 29 20 24 28 48 45 41 |$(SOURCE|S) $(HEA|
|000016e0| 44 45 52 53 29 0a 09 63 | 74 61 67 73 20 2d 77 20 |DERS)..c|tags -w |
|000016f0| 24 28 53 4f 55 52 43 45 | 53 29 20 24 28 48 45 41 |$(SOURCE|S) $(HEA|
|00001700| 44 45 52 53 29 0a 0a 63 | 68 65 63 6b 6f 75 74 3a |DERS)..c|heckout:|
|00001710| 0a 09 63 6f 20 24 28 53 | 4f 55 52 43 45 53 29 20 |..co $(S|OURCES) |
|00001720| 24 28 48 45 41 44 45 52 | 53 29 20 24 28 4d 41 4e |$(HEADER|S) $(MAN|
|00001730| 46 49 4c 45 53 29 0a 0a | 23 0a 23 20 44 69 73 74 |FILES)..|#.# Dist|
|00001740| 72 69 62 75 74 69 6f 6e | 20 73 65 63 74 69 6f 6e |ribution| section|
|00001750| 0a 23 20 54 68 69 73 20 | 73 65 63 74 69 6f 6e 20 |.# This |section |
|00001760| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 32 20 74 |contains| the 2 t|
|00001770| 61 72 67 65 74 73 20 66 | 6f 72 20 64 69 73 74 72 |argets f|or distr|
|00001780| 69 62 75 74 69 6f 6e 20 | 73 75 70 70 6f 72 74 3a |ibution |support:|
|00001790| 20 64 69 73 74 2c 20 64 | 69 72 73 0a 23 20 22 64 | dist, d|irs.# "d|
|000017a0| 69 73 74 22 20 63 68 65 | 63 6b 73 20 6f 75 74 20 |ist" che|cks out |
|000017b0| 61 6c 6c 20 66 69 6c 65 | 73 20 74 6f 20 62 65 20 |all file|s to be |
|000017c0| 64 69 73 74 72 69 62 75 | 74 65 64 0a 23 20 22 64 |distribu|ted.# "d|
|000017d0| 69 72 73 22 20 70 72 69 | 6e 74 73 20 61 20 6c 69 |irs" pri|nts a li|
|000017e0| 73 74 20 6f 66 20 64 69 | 72 65 63 74 6f 72 69 65 |st of di|rectorie|
|000017f0| 73 20 74 6f 20 62 65 20 | 69 6e 63 6c 75 64 65 64 |s to be |included|
|00001800| 20 69 6e 20 74 68 65 20 | 64 69 73 74 72 69 62 75 | in the |distribu|
|00001810| 74 69 6f 6e 2e 0a 23 20 | 54 68 65 73 65 20 64 69 |tion..# |These di|
|00001820| 72 65 63 74 6f 72 69 65 | 73 20 73 68 6f 75 6c 64 |rectorie|s should|
|00001830| 20 68 61 76 65 20 61 20 | 4d 61 6b 65 66 69 6c 65 | have a |Makefile|
|00001840| 20 77 69 74 68 20 61 20 | 22 64 69 73 74 22 20 74 | with a |"dist" t|
|00001850| 61 72 67 65 74 0a 23 0a | 44 49 53 54 52 49 42 55 |arget.#.|DISTRIBU|
|00001860| 54 49 4f 4e 5f 46 49 4c | 45 53 09 3d 20 24 28 53 |TION_FIL|ES.= $(S|
|00001870| 4f 55 52 43 45 53 29 20 | 24 28 48 45 41 44 45 52 |OURCES) |$(HEADER|
|00001880| 53 29 20 24 28 4d 41 4e | 46 49 4c 45 53 29 0a 44 |S) $(MAN|FILES).D|
|00001890| 49 52 53 09 09 09 09 09 | 09 3d 0a 0a 64 69 73 74 |IRS.....|.=..dist|
|000018a0| 3a 0a 09 2d 63 6f 20 2d | 71 20 24 28 44 49 53 54 |:..-co -|q $(DIST|
|000018b0| 52 49 42 55 54 49 4f 4e | 5f 46 49 4c 45 53 29 0a |RIBUTION|_FILES).|
|000018c0| 0a 64 69 72 73 3a 0a 09 | 40 65 63 68 6f 20 24 28 |.dirs:..|@echo $(|
|000018d0| 44 49 52 53 29 0a 0a 23 | 0a 23 20 50 55 54 20 48 |DIRS)..#|.# PUT H|
|000018e0| 45 52 45 20 54 48 45 20 | 52 55 4c 45 53 20 54 4f |ERE THE |RULES TO|
|000018f0| 20 4d 41 4b 45 20 54 48 | 45 20 4f 42 4a 45 43 54 | MAKE TH|E OBJECT|
|00001900| 20 46 49 4c 45 53 0a 23 | 0a 66 73 6d 61 2e 6f 3a | FILES.#|.fsma.o:|
|00001910| 20 66 73 6d 61 2e 68 20 | 69 6d 70 6c 2e 68 0a 0a | fsma.h |impl.h..|
|00001920| 23 0a 23 20 54 65 73 74 | 20 70 72 6f 67 72 61 6d |#.# Test| program|
|00001930| 0a 23 0a 66 74 65 73 74 | 3a 20 66 74 65 73 74 2e |.#.ftest|: ftest.|
|00001940| 63 20 24 28 4c 49 42 4e | 41 4d 45 29 0a 09 24 28 |c $(LIBN|AME)..$(|
|00001950| 43 43 29 20 2d 67 20 66 | 74 65 73 74 2e 63 20 2d |CC) -g f|test.c -|
|00001960| 6f 20 24 40 20 24 28 4c | 49 42 4e 41 4d 45 29 0a |o $@ $(L|IBNAME).|
|00001970| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 2e 2f 66 73 6d 61 2e 63 | 00 00 00 00 00 00 00 00 |./fsma.c|........|
|00001a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00001a70| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00001a80| 20 20 31 33 33 30 31 20 | 20 35 32 37 37 34 30 37 | 13301 | 5277407|
|00001a90| 32 32 31 20 20 20 35 33 | 36 34 00 20 00 00 00 00 |221 53|64. ....|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 2f 2a 0a 20 2a 20 28 63 | 29 20 43 6f 70 79 72 69 |/*. * (c|) Copyri|
|00001c10| 67 68 74 20 31 39 39 32 | 20 62 79 20 50 61 6e 61 |ght 1992| by Pana|
|00001c20| 67 69 6f 74 69 73 20 54 | 73 69 72 69 67 6f 74 69 |giotis T|sirigoti|
|00001c30| 73 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |s. * All| rights |
|00001c40| 72 65 73 65 72 76 65 64 | 2e 20 20 54 68 65 20 66 |reserved|. The f|
|00001c50| 69 6c 65 20 6e 61 6d 65 | 64 20 43 4f 50 59 52 49 |ile name|d COPYRI|
|00001c60| 47 48 54 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |GHT spec|ifies th|
|00001c70| 65 20 74 65 72 6d 73 20 | 0a 20 2a 20 61 6e 64 20 |e terms |. * and |
|00001c80| 63 6f 6e 64 69 74 69 6f | 6e 73 20 66 6f 72 20 72 |conditio|ns for r|
|00001c90| 65 64 69 73 74 72 69 62 | 75 74 69 6f 6e 2e 0a 20 |edistrib|ution.. |
|00001ca0| 2a 2f 0a 0a 2f 2a 0a 20 | 2a 20 24 49 64 3a 20 66 |*/../*. |* $Id: f|
|00001cb0| 73 6d 61 2e 63 2c 76 20 | 35 2e 31 20 31 39 39 32 |sma.c,v |5.1 1992|
|00001cc0| 2f 31 30 2f 31 30 20 30 | 37 3a 32 33 3a 31 38 20 |/10/10 0|7:23:18 |
|00001cd0| 70 61 6e 6f 73 20 45 78 | 70 20 24 0a 20 2a 2f 0a |panos Ex|p $. */.|
|00001ce0| 0a 23 69 6e 63 6c 75 64 | 65 20 22 66 73 6d 61 2e |.#includ|e "fsma.|
|00001cf0| 68 22 0a 23 69 6e 63 6c | 75 64 65 20 22 69 6d 70 |h".#incl|ude "imp|
|00001d00| 6c 2e 68 22 0a 0a 23 69 | 66 64 65 66 20 44 45 42 |l.h"..#i|fdef DEB|
|00001d10| 55 47 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |UG.#incl|ude <std|
|00001d20| 69 6f 2e 68 3e 0a 23 65 | 6e 64 69 66 0a 0a 2f 2a |io.h>.#e|ndif../*|
|00001d30| 0a 20 2a 20 57 65 20 61 | 73 73 75 6d 65 20 74 68 |. * We a|ssume th|
|00001d40| 61 74 20 6d 65 6d 6f 72 | 79 20 68 61 6e 64 65 64 |at memor|y handed|
|00001d50| 20 62 79 20 6d 61 6c 6c | 6f 63 20 69 73 20 73 75 | by mall|oc is su|
|00001d60| 69 74 61 62 6c 79 20 61 | 6c 69 67 6e 65 64 20 66 |itably a|ligned f|
|00001d70| 6f 72 20 61 6e 79 0a 20 | 2a 20 6d 61 63 68 69 6e |or any. |* machin|
|00001d80| 65 20 64 61 74 61 20 74 | 79 70 65 20 28 66 6f 72 |e data t|ype (for|
|00001d90| 20 65 78 61 6d 70 6c 65 | 2c 20 69 66 20 74 68 65 | example|, if the|
|00001da0| 20 43 50 55 20 77 61 6e | 74 73 20 64 6f 75 62 6c | CPU wan|ts doubl|
|00001db0| 65 27 73 20 61 6c 69 67 | 6e 65 64 0a 20 2a 20 61 |e's alig|ned. * a|
|00001dc0| 74 20 61 6e 20 38 2d 62 | 79 74 65 20 62 6f 75 6e |t an 8-b|yte boun|
|00001dd0| 64 61 72 79 2c 20 74 68 | 65 20 6d 65 6d 6f 72 79 |dary, th|e memory|
|00001de0| 20 70 72 6f 76 69 64 65 | 64 20 62 79 20 6d 61 6c | provide|d by mal|
|00001df0| 6c 6f 63 20 77 69 6c 6c | 20 62 65 20 73 6f 20 61 |loc will| be so a|
|00001e00| 6c 69 67 6e 65 64 29 2e | 0a 20 2a 2f 0a 63 68 61 |ligned).|. */.cha|
|00001e10| 72 20 2a 6d 61 6c 6c 6f | 63 28 29 20 3b 0a 69 6e |r *mallo|c() ;.in|
|00001e20| 74 20 66 72 65 65 28 29 | 20 3b 0a 0a 73 74 61 74 |t free()| ;..stat|
|00001e30| 69 63 20 63 68 61 72 20 | 2a 76 65 72 73 69 6f 6e |ic char |*version|
|00001e40| 20 3d 20 56 45 52 53 49 | 4f 4e 20 3b 0a 0a 50 52 | = VERSI|ON ;..PR|
|00001e50| 49 56 41 54 45 20 76 6f | 69 64 20 69 6e 69 74 5f |IVATE vo|id init_|
|00001e60| 66 72 65 65 5f 6c 69 73 | 74 20 5f 5f 41 52 47 53 |free_lis|t __ARGS|
|00001e70| 28 20 28 20 75 6e 73 69 | 67 6e 65 64 2c 20 75 6e |( ( unsi|gned, un|
|00001e80| 73 69 67 6e 65 64 2c 20 | 63 68 61 72 20 2a 20 29 |signed, |char * )|
|00001e90| 20 29 20 3b 0a 50 52 49 | 56 41 54 45 20 76 6f 69 | ) ;.PRI|VATE voi|
|00001ea0| 64 20 74 65 72 6d 69 6e | 61 74 65 20 5f 5f 41 52 |d termin|ate __AR|
|00001eb0| 47 53 28 20 28 20 63 68 | 61 72 20 2a 20 29 20 29 |GS( ( ch|ar * ) )|
|00001ec0| 20 3b 0a 0a 0a 2f 2a 0a | 20 2a 20 41 6e 20 61 6c | ;.../*.| * An al|
|00001ed0| 6c 6f 63 61 74 6f 72 20 | 6d 61 6e 61 67 65 73 20 |locator |manages |
|00001ee0| 61 20 6c 69 6e 6b 65 64 | 20 6c 69 73 74 20 6f 66 |a linked| list of|
|00001ef0| 20 63 68 75 6e 6b 73 3a | 0a 20 2a 0a 20 2a 09 09 | chunks:|. *. *..|
|00001f00| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 09 09 |________|______..|
|00001f10| 09 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 09 |._______|_______.|
|00001f20| 09 09 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |..______|________|
|00001f30| 0a 20 2a 09 09 7c 20 20 | 20 48 45 41 44 45 52 09 |. *..| | HEADER.|
|00001f40| 20 7c 2d 2d 2d 2d 2d 2d | 3e 7c 09 09 09 09 20 7c | |------|>|.... ||
|00001f50| 2d 2d 2d 2d 2d 2d 3e 7c | 09 09 09 09 20 7c 0a 20 |------>||.... |. |
|00001f60| 2a 09 09 7c 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |*..|____|________|
|00001f70| 7c 09 09 09 7c 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f ||...|___|________|
|00001f80| 5f 7c 09 09 09 7c 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |_|...|__|________|
|00001f90| 5f 5f 7c 0a 20 2a 09 09 | 7c 09 09 20 09 09 20 7c |__|. *..||.. .. ||
|00001fa0| 09 09 09 7c 09 09 20 09 | 09 20 7c 09 09 09 7c 09 |...|.. .|. |...|.|
|00001fb0| 09 20 09 09 20 7c 0a 20 | 2a 09 09 7c 09 09 20 09 |. .. |. |*..|.. .|
|00001fc0| 09 20 7c 09 09 09 7c 09 | 09 20 09 09 20 7c 09 09 |. |...|.|. .. |..|
|00001fd0| 09 7c 09 09 20 09 09 20 | 7c 0a 20 2a 09 09 7c 09 |.|.. .. ||. *..|.|
|00001fe0| 09 20 09 09 20 7c 09 09 | 09 7c 09 09 20 09 09 20 |. .. |..|.|.. .. |
|00001ff0| 7c 09 09 09 7c 09 09 20 | 09 09 20 7c 0a 20 2a 09 ||...|.. |.. |. *.|
|00002000| 09 7c 09 09 20 09 09 20 | 7c 09 09 09 7c 09 09 20 |.|.. .. ||...|.. |
|00002010| 09 09 20 7c 09 09 09 7c | 09 09 20 09 09 20 7c 0a |.. |...||.. .. |.|
|00002020| 20 2a 09 09 7c 09 20 53 | 4c 4f 54 53 09 20 7c 09 | *..|. S|LOTS. |.|
|00002030| 09 09 7c 09 09 20 09 09 | 20 7c 09 09 09 7c 09 09 |..|.. ..| |...|..|
|00002040| 20 09 09 20 7c 0a 20 2a | 09 09 7c 09 09 20 09 09 | .. |. *|..|.. ..|
|00002050| 20 7c 09 09 09 7c 09 09 | 20 09 09 20 7c 09 09 09 | |...|..| .. |...|
|00002060| 7c 09 09 20 09 09 20 7c | 0a 20 2a 09 09 7c 09 09 ||.. .. ||. *..|..|
|00002070| 20 09 09 20 7c 09 09 09 | 7c 09 09 20 09 09 20 7c | .. |...||.. .. ||
|00002080| 09 09 09 7c 09 09 20 09 | 09 20 7c 0a 20 2a 09 09 |...|.. .|. |. *..|
|00002090| 7c 09 09 20 09 09 20 7c | 09 09 09 7c 09 09 20 09 ||.. .. ||...|.. .|
|000020a0| 09 20 7c 09 09 09 7c 09 | 09 20 09 09 20 7c 0a 20 |. |...|.|. .. |. |
|000020b0| 2a 09 09 7c 09 09 20 09 | 09 20 7c 09 09 09 7c 09 |*..|.. .|. |...|.|
|000020c0| 09 20 09 09 20 7c 09 09 | 09 7c 09 09 20 09 09 20 |. .. |..|.|.. .. |
|000020d0| 7c 0a 20 2a 09 09 7c 5f | 5f 5f 5f 5f 5f 5f 5f 5f ||. *..|_|________|
|000020e0| 5f 5f 5f 7c 09 09 09 7c | 5f 5f 5f 5f 5f 5f 5f 5f |___|...||________|
|000020f0| 5f 5f 5f 5f 7c 09 09 09 | 7c 5f 5f 5f 5f 5f 5f 5f |____|...||_______|
|00002100| 5f 5f 5f 5f 5f 7c 0a 20 | 2a 0a 20 2a 0a 20 2a 20 |_____|. |*. *. * |
|00002110| 54 68 65 20 53 4c 4f 54 | 53 20 73 65 63 74 69 6f |The SLOT|S sectio|
|00002120| 6e 73 20 61 72 65 20 6f | 72 67 61 6e 69 7a 65 64 |ns are o|rganized|
|00002130| 20 61 73 20 61 20 6c 69 | 6e 6b 65 64 20 6c 69 73 | as a li|nked lis|
|00002140| 74 20 6f 66 20 73 6c 6f | 74 73 20 77 68 6f 73 65 |t of slo|ts whose|
|00002150| 0a 20 2a 20 73 69 7a 65 | 20 69 73 20 64 65 74 65 |. * size| is dete|
|00002160| 72 6d 69 6e 65 64 20 62 | 79 20 74 68 65 20 6f 62 |rmined b|y the ob|
|00002170| 6a 65 63 74 20 73 69 7a | 65 20 73 70 65 63 69 66 |ject siz|e specif|
|00002180| 69 65 64 20 69 6e 20 66 | 73 6d 5f 63 72 65 61 74 |ied in f|sm_creat|
|00002190| 65 0a 20 2a 2f 0a 0a 66 | 73 6d 61 5f 68 20 66 73 |e. */..f|sma_h fs|
|000021a0| 6d 5f 63 72 65 61 74 65 | 28 20 6f 62 6a 65 63 74 |m_create|( object|
|000021b0| 5f 73 69 7a 65 2c 20 73 | 6c 6f 74 73 5f 70 65 72 |_size, s|lots_per|
|000021c0| 5f 63 68 75 6e 6b 2c 20 | 66 6c 61 67 73 20 29 0a |_chunk, |flags ).|
|000021d0| 09 75 6e 73 69 67 6e 65 | 64 20 6f 62 6a 65 63 74 |.unsigne|d object|
|000021e0| 5f 73 69 7a 65 20 3b 0a | 09 75 6e 73 69 67 6e 65 |_size ;.|.unsigne|
|000021f0| 64 20 73 6c 6f 74 73 5f | 70 65 72 5f 63 68 75 6e |d slots_|per_chun|
|00002200| 6b 20 3b 0a 09 69 6e 74 | 20 66 6c 61 67 73 20 3b |k ;..int| flags ;|
|00002210| 0a 7b 0a 09 72 65 67 69 | 73 74 65 72 20 66 73 6d |.{..regi|ster fsm|
|00002220| 61 5f 68 20 66 70 20 3b | 0a 09 75 6e 69 6f 6e 20 |a_h fp ;|..union |
|00002230| 5f 5f 66 73 6d 61 5f 63 | 68 75 6e 6b 5f 68 65 61 |__fsma_c|hunk_hea|
|00002240| 64 65 72 20 2a 63 68 70 | 20 3b 0a 09 63 68 61 72 |der *chp| ;..char|
|00002250| 20 2a 73 6c 6f 74 73 20 | 3b 0a 09 75 6e 73 69 67 | *slots |;..unsig|
|00002260| 6e 65 64 20 6e 73 6c 6f | 74 73 20 3b 0a 09 75 6e |ned nslo|ts ;..un|
|00002270| 73 69 67 6e 65 64 20 63 | 68 75 6e 6b 5f 73 69 7a |signed c|hunk_siz|
|00002280| 65 2c 20 73 6c 6f 74 5f | 73 69 7a 65 20 3b 0a 09 |e, slot_|size ;..|
|00002290| 69 6e 74 20 68 65 61 64 | 65 72 5f 69 6e 6c 69 6e |int head|er_inlin|
|000022a0| 65 64 20 3b 0a 0a 09 73 | 6c 6f 74 5f 73 69 7a 65 |ed ;...s|lot_size|
|000022b0| 20 3d 20 28 20 6f 62 6a | 65 63 74 5f 73 69 7a 65 | = ( obj|ect_size|
|000022c0| 20 3c 20 4d 49 4e 53 49 | 5a 45 20 29 20 3f 20 4d | < MINSI|ZE ) ? M|
|000022d0| 49 4e 53 49 5a 45 20 3a | 20 6f 62 6a 65 63 74 5f |INSIZE :| object_|
|000022e0| 73 69 7a 65 20 3b 0a 09 | 6e 73 6c 6f 74 73 20 3d |size ;..|nslots =|
|000022f0| 20 28 20 73 6c 6f 74 73 | 5f 70 65 72 5f 63 68 75 | ( slots|_per_chu|
|00002300| 6e 6b 20 3d 3d 20 30 20 | 29 20 3f 20 53 4c 4f 54 |nk == 0 |) ? SLOT|
|00002310| 53 5f 50 45 52 5f 43 48 | 55 4e 4b 20 3a 20 73 6c |S_PER_CH|UNK : sl|
|00002320| 6f 74 73 5f 70 65 72 5f | 63 68 75 6e 6b 20 3b 0a |ots_per_|chunk ;.|
|00002330| 0a 09 63 68 75 6e 6b 5f | 73 69 7a 65 20 3d 20 73 |..chunk_|size = s|
|00002340| 69 7a 65 6f 66 28 20 75 | 6e 69 6f 6e 20 5f 5f 66 |izeof( u|nion __f|
|00002350| 73 6d 61 5f 63 68 75 6e | 6b 5f 68 65 61 64 65 72 |sma_chun|k_header|
|00002360| 20 29 20 2b 20 6e 73 6c | 6f 74 73 20 2a 20 73 6c | ) + nsl|ots * sl|
|00002370| 6f 74 5f 73 69 7a 65 20 | 3b 0a 0a 09 63 68 70 20 |ot_size |;...chp |
|00002380| 3d 20 43 48 55 4e 4b 5f | 48 45 41 44 45 52 28 20 |= CHUNK_|HEADER( |
|00002390| 6d 61 6c 6c 6f 63 28 20 | 63 68 75 6e 6b 5f 73 69 |malloc( |chunk_si|
|000023a0| 7a 65 20 29 20 29 20 3b | 0a 09 69 66 20 28 20 63 |ze ) ) ;|..if ( c|
|000023b0| 68 70 20 3d 3d 20 4e 55 | 4c 4c 20 29 0a 09 09 69 |hp == NU|LL )...i|
|000023c0| 66 20 28 20 66 6c 61 67 | 73 20 26 20 46 53 4d 5f |f ( flag|s & FSM_|
|000023d0| 52 45 54 55 52 4e 5f 45 | 52 52 4f 52 20 29 0a 09 |RETURN_E|RROR )..|
|000023e0| 09 09 72 65 74 75 72 6e | 28 20 4e 55 4c 4c 20 29 |..return|( NULL )|
|000023f0| 20 3b 0a 09 09 65 6c 73 | 65 0a 09 09 09 74 65 72 | ;...els|e....ter|
|00002400| 6d 69 6e 61 74 65 28 20 | 22 46 53 4d 41 20 66 73 |minate( |"FSMA fs|
|00002410| 6d 5f 63 72 65 61 74 65 | 3a 20 6d 61 6c 6c 6f 63 |m_create|: malloc|
|00002420| 20 66 61 69 6c 65 64 5c | 6e 22 20 29 20 3b 0a 0a | failed\|n" ) ;..|
|00002430| 09 73 6c 6f 74 73 20 3d | 20 28 63 68 61 72 20 2a |.slots =| (char *|
|00002440| 29 20 26 63 68 70 5b 20 | 31 20 5d 20 3b 0a 09 69 |) &chp[ |1 ] ;..i|
|00002450| 6e 69 74 5f 66 72 65 65 | 5f 6c 69 73 74 28 20 6e |nit_free|_list( n|
|00002460| 73 6c 6f 74 73 2c 20 73 | 6c 6f 74 5f 73 69 7a 65 |slots, s|lot_size|
|00002470| 2c 20 73 6c 6f 74 73 20 | 29 20 3b 0a 0a 23 69 66 |, slots |) ;..#if|
|00002480| 64 65 66 20 44 45 42 55 | 47 0a 09 7b 0a 09 09 69 |def DEBU|G..{...i|
|00002490| 6e 74 20 69 20 3b 0a 0a | 09 09 66 70 72 69 6e 74 |nt i ;..|..fprint|
|000024a0| 66 28 20 73 74 64 65 72 | 72 2c 20 22 53 69 7a 65 |f( stder|r, "Size|
|000024b0| 20 3d 20 25 64 2c 20 6e | 73 6c 6f 74 73 20 3d 20 | = %d, n|slots = |
|000024c0| 25 64 5c 6e 22 2c 20 73 | 6c 6f 74 5f 73 69 7a 65 |%d\n", s|lot_size|
|000024d0| 2c 20 6e 73 6c 6f 74 73 | 20 29 20 3b 0a 09 09 66 |, nslots| ) ;...f|
|000024e0| 6f 72 20 28 20 69 20 3d | 20 30 20 3b 20 69 20 3c |or ( i =| 0 ; i <|
|000024f0| 20 6e 73 6c 6f 74 73 2b | 31 20 3b 20 69 2b 2b 20 | nslots+|1 ; i++ |
|00002500| 29 0a 09 09 09 66 70 72 | 69 6e 74 66 28 20 73 74 |)....fpr|intf( st|
|00002510| 64 65 72 72 2c 20 22 73 | 6c 6f 74 5b 20 25 64 20 |derr, "s|lot[ %d |
|00002520| 5d 20 3d 20 25 70 5c 6e | 22 2c 0a 09 09 09 09 09 |] = %p\n|",......|
|00002530| 09 09 69 2c 20 28 2a 28 | 63 68 61 72 20 2a 2a 29 |..i, (*(|char **)|
|00002540| 20 28 73 6c 6f 74 73 20 | 2b 20 69 20 2a 20 73 6c | (slots |+ i * sl|
|00002550| 6f 74 5f 73 69 7a 65 20 | 29 29 29 20 3b 0a 09 7d |ot_size |))) ;..}|
|00002560| 0a 23 65 6e 64 69 66 0a | 0a 09 2f 2a 0a 09 20 2a |.#endif.|../*.. *|
|00002570| 20 43 68 65 63 6b 20 69 | 66 20 77 65 20 63 61 6e | Check i|f we can|
|00002580| 20 66 69 74 20 74 68 65 | 20 68 65 61 64 65 72 20 | fit the| header |
|00002590| 69 6e 20 61 6e 20 6f 62 | 6a 65 63 74 20 73 6c 6f |in an ob|ject slo|
|000025a0| 74 0a 09 20 2a 2f 0a 09 | 69 66 20 28 20 73 6c 6f |t.. */..|if ( slo|
|000025b0| 74 5f 73 69 7a 65 20 3e | 3d 20 73 69 7a 65 6f 66 |t_size >|= sizeof|
|000025c0| 28 20 73 74 72 75 63 74 | 20 5f 5f 66 73 6d 61 5f |( struct| __fsma_|
|000025d0| 68 65 61 64 65 72 20 29 | 20 29 0a 09 7b 0a 09 09 |header )| )..{...|
|000025e0| 2f 2a 0a 09 09 20 2a 20 | 57 65 20 63 61 6e 20 64 |/*... * |We can d|
|000025f0| 6f 20 69 74 2e 0a 09 09 | 20 2a 20 41 6c 6c 6f 63 |o it....| * Alloc|
|00002600| 61 74 65 20 74 68 65 20 | 66 69 72 73 74 20 73 6c |ate the |first sl|
|00002610| 6f 74 0a 09 09 20 2a 2f | 0a 09 09 66 70 20 3d 20 |ot... */|...fp = |
|00002620| 28 66 73 6d 61 5f 68 29 | 20 73 6c 6f 74 73 20 3b |(fsma_h)| slots ;|
|00002630| 0a 09 09 73 6c 6f 74 73 | 20 3d 20 2a 28 50 4f 49 |...slots| = *(POI|
|00002640| 4e 54 45 52 20 2a 29 20 | 73 6c 6f 74 73 20 3b 0a |NTER *) |slots ;.|
|00002650| 09 09 68 65 61 64 65 72 | 5f 69 6e 6c 69 6e 65 64 |..header|_inlined|
|00002660| 20 3d 20 54 52 55 45 20 | 3b 0a 09 7d 0a 09 65 6c | = TRUE |;..}..el|
|00002670| 73 65 0a 09 7b 0a 09 09 | 66 70 20 3d 20 28 66 73 |se..{...|fp = (fs|
|00002680| 6d 61 5f 68 29 20 6d 61 | 6c 6c 6f 63 28 20 73 69 |ma_h) ma|lloc( si|
|00002690| 7a 65 6f 66 28 20 73 74 | 72 75 63 74 20 5f 5f 66 |zeof( st|ruct __f|
|000026a0| 73 6d 61 5f 68 65 61 64 | 65 72 20 29 20 29 20 3b |sma_head|er ) ) ;|
|000026b0| 0a 09 09 69 66 20 28 20 | 66 70 20 3d 3d 20 4e 55 |...if ( |fp == NU|
|000026c0| 4c 4c 20 29 0a 09 09 09 | 69 66 20 28 20 66 6c 61 |LL )....|if ( fla|
|000026d0| 67 73 20 26 20 46 53 4d | 5f 52 45 54 55 52 4e 5f |gs & FSM|_RETURN_|
|000026e0| 45 52 52 4f 52 20 29 0a | 09 09 09 7b 0a 09 09 09 |ERROR ).|...{....|
|000026f0| 09 66 72 65 65 28 20 28 | 63 68 61 72 20 2a 29 20 |.free( (|char *) |
|00002700| 63 68 70 20 29 20 3b 0a | 09 09 09 09 72 65 74 75 |chp ) ;.|....retu|
|00002710| 72 6e 28 20 4e 55 4c 4c | 20 29 20 3b 0a 09 09 09 |rn( NULL| ) ;....|
|00002720| 7d 0a 09 09 09 65 6c 73 | 65 0a 09 09 09 09 74 65 |}....els|e.....te|
|00002730| 72 6d 69 6e 61 74 65 28 | 20 22 46 53 4d 41 20 66 |rminate(| "FSMA f|
|00002740| 73 6d 5f 63 72 65 61 74 | 65 3a 20 6d 61 6c 6c 6f |sm_creat|e: mallo|
|00002750| 63 20 6f 66 20 68 65 61 | 64 65 72 20 66 61 69 6c |c of hea|der fail|
|00002760| 65 64 5c 6e 22 20 29 20 | 3b 0a 09 09 68 65 61 64 |ed\n" ) |;...head|
|00002770| 65 72 5f 69 6e 6c 69 6e | 65 64 20 3d 20 46 41 4c |er_inlin|ed = FAL|
|00002780| 53 45 20 3b 0a 09 7d 0a | 0a 09 63 68 70 2d 3e 6e |SE ;..}.|..chp->n|
|00002790| 65 78 74 5f 63 68 75 6e | 6b 20 3d 20 4e 55 4c 4c |ext_chun|k = NULL|
|000027a0| 20 3b 0a 0a 09 66 70 2d | 3e 6e 65 78 74 5f 66 72 | ;...fp-|>next_fr|
|000027b0| 65 65 20 3d 20 28 50 4f | 49 4e 54 45 52 29 20 73 |ee = (PO|INTER) s|
|000027c0| 6c 6f 74 73 20 3b 0a 09 | 66 70 2d 3e 63 68 75 6e |lots ;..|fp->chun|
|000027d0| 6b 5f 63 68 61 69 6e 20 | 3d 20 63 68 70 20 3b 0a |k_chain |= chp ;.|
|000027e0| 09 66 70 2d 3e 73 6c 6f | 74 73 5f 69 6e 5f 63 68 |.fp->slo|ts_in_ch|
|000027f0| 75 6e 6b 20 3d 20 6e 73 | 6c 6f 74 73 20 3b 0a 09 |unk = ns|lots ;..|
|00002800| 66 70 2d 3e 73 6c 6f 74 | 5f 73 69 7a 65 20 3d 20 |fp->slot|_size = |
|00002810| 73 6c 6f 74 5f 73 69 7a | 65 20 3b 0a 09 66 70 2d |slot_siz|e ;..fp-|
|00002820| 3e 63 68 75 6e 6b 5f 73 | 69 7a 65 20 3d 20 63 68 |>chunk_s|ize = ch|
|00002830| 75 6e 6b 5f 73 69 7a 65 | 20 3b 0a 09 66 70 2d 3e |unk_size| ;..fp->|
|00002840| 66 6c 61 67 73 20 3d 20 | 66 6c 61 67 73 20 3b 0a |flags = |flags ;.|
|00002850| 09 66 70 2d 3e 69 73 5f | 69 6e 6c 69 6e 65 64 20 |.fp->is_|inlined |
|00002860| 3d 20 68 65 61 64 65 72 | 5f 69 6e 6c 69 6e 65 64 |= header|_inlined|
|00002870| 20 3b 0a 0a 23 69 66 64 | 65 66 20 44 45 42 55 47 | ;..#ifd|ef DEBUG|
|00002880| 0a 09 66 70 72 69 6e 74 | 66 28 20 73 74 64 65 72 |..fprint|f( stder|
|00002890| 72 2c 20 22 53 6c 6f 74 | 73 2f 63 68 75 6e 6b 20 |r, "Slot|s/chunk |
|000028a0| 3d 20 25 64 5c 6e 22 2c | 20 6e 73 6c 6f 74 73 20 |= %d\n",| nslots |
|000028b0| 29 20 3b 0a 09 66 70 72 | 69 6e 74 66 28 20 73 74 |) ;..fpr|intf( st|
|000028c0| 64 65 72 72 2c 20 22 41 | 6c 6c 6f 63 61 74 69 6e |derr, "A|llocatin|
|000028d0| 67 20 63 68 75 6e 6b 20 | 25 70 5c 6e 22 2c 20 63 |g chunk |%p\n", c|
|000028e0| 68 75 6e 6b 20 29 20 3b | 0a 23 65 6e 64 69 66 0a |hunk ) ;|.#endif.|
|000028f0| 09 0a 09 72 65 74 75 72 | 6e 28 20 28 66 73 6d 61 |...retur|n( (fsma|
|00002900| 5f 68 29 20 66 70 20 29 | 20 3b 0a 7d 0a 0a 0a 0a |_h) fp )| ;.}....|
|00002910| 76 6f 69 64 20 66 73 6d | 5f 64 65 73 74 72 6f 79 |void fsm|_destroy|
|00002920| 28 20 66 70 20 29 0a 09 | 72 65 67 69 73 74 65 72 |( fp )..|register|
|00002930| 20 66 73 6d 61 5f 68 20 | 66 70 20 3b 0a 7b 0a 09 | fsma_h |fp ;.{..|
|00002940| 69 6e 74 20 68 65 61 64 | 65 72 5f 69 6e 6c 69 6e |int head|er_inlin|
|00002950| 65 64 20 3d 20 66 70 2d | 3e 69 73 5f 69 6e 6c 69 |ed = fp-|>is_inli|
|00002960| 6e 65 64 20 3b 0a 09 72 | 65 67 69 73 74 65 72 20 |ned ;..r|egister |
|00002970| 75 6e 69 6f 6e 20 5f 5f | 66 73 6d 61 5f 63 68 75 |union __|fsma_chu|
|00002980| 6e 6b 5f 68 65 61 64 65 | 72 20 2a 63 68 70 2c 20 |nk_heade|r *chp, |
|00002990| 2a 6e 65 78 74 5f 63 68 | 75 6e 6b 20 3b 0a 09 72 |*next_ch|unk ;..r|
|000029a0| 65 67 69 73 74 65 72 20 | 69 6e 74 20 7a 65 72 6f |egister |int zero|
|000029b0| 5f 6d 65 6d 6f 72 79 20 | 3d 20 66 70 2d 3e 66 6c |_memory |= fp->fl|
|000029c0| 61 67 73 20 26 20 46 53 | 4d 5f 5a 45 52 4f 5f 44 |ags & FS|M_ZERO_D|
|000029d0| 45 53 54 52 4f 59 20 3b | 0a 09 72 65 67 69 73 74 |ESTROY ;|..regist|
|000029e0| 65 72 20 63 68 75 6e 6b | 5f 73 69 7a 65 20 3d 20 |er chunk|_size = |
|000029f0| 66 70 2d 3e 63 68 75 6e | 6b 5f 73 69 7a 65 20 3b |fp->chun|k_size ;|
|00002a00| 0a 0a 09 2f 2a 0a 09 20 | 2a 20 46 72 65 65 20 61 |.../*.. |* Free a|
|00002a10| 6c 6c 20 63 68 75 6e 6b | 73 20 69 6e 20 74 68 65 |ll chunk|s in the|
|00002a20| 20 63 68 75 6e 6b 20 63 | 68 61 69 6e 0a 09 20 2a | chunk c|hain.. *|
|00002a30| 2f 0a 09 66 6f 72 20 28 | 20 63 68 70 20 3d 20 66 |/..for (| chp = f|
|00002a40| 70 2d 3e 63 68 75 6e 6b | 5f 63 68 61 69 6e 20 3b |p->chunk|_chain ;|
|00002a50| 20 63 68 70 20 21 3d 20 | 4e 55 4c 4c 20 3b 20 63 | chp != |NULL ; c|
|00002a60| 68 70 20 3d 20 6e 65 78 | 74 5f 63 68 75 6e 6b 20 |hp = nex|t_chunk |
|00002a70| 29 0a 09 7b 0a 09 09 6e | 65 78 74 5f 63 68 75 6e |)..{...n|ext_chun|
|00002a80| 6b 20 3d 20 63 68 70 2d | 3e 6e 65 78 74 5f 63 68 |k = chp-|>next_ch|
|00002a90| 75 6e 6b 20 3b 0a 09 09 | 69 66 20 28 20 7a 65 72 |unk ;...|if ( zer|
|00002aa0| 6f 5f 6d 65 6d 6f 72 79 | 20 29 0a 09 09 09 28 76 |o_memory| )....(v|
|00002ab0| 6f 69 64 29 20 6d 65 6d | 73 65 74 28 20 28 63 68 |oid) mem|set( (ch|
|00002ac0| 61 72 20 2a 29 63 68 70 | 2c 20 30 2c 20 63 68 75 |ar *)chp|, 0, chu|
|00002ad0| 6e 6b 5f 73 69 7a 65 20 | 29 20 3b 0a 0a 23 69 66 |nk_size |) ;..#if|
|00002ae0| 64 65 66 20 44 45 42 55 | 47 0a 09 09 66 70 72 69 |def DEBU|G...fpri|
|00002af0| 6e 74 66 28 20 73 74 64 | 65 72 72 2c 20 22 46 72 |ntf( std|err, "Fr|
|00002b00| 65 65 69 6e 67 20 63 68 | 75 6e 6b 20 25 70 5c 6e |eeing ch|unk %p\n|
|00002b10| 22 2c 20 63 68 70 20 29 | 20 3b 0a 23 65 6e 64 69 |", chp )| ;.#endi|
|00002b20| 66 0a 09 09 66 72 65 65 | 28 20 28 63 68 61 72 20 |f...free|( (char |
|00002b30| 2a 29 63 68 70 20 29 20 | 3b 0a 09 7d 0a 0a 09 2f |*)chp ) |;..}.../|
|00002b40| 2a 0a 09 20 2a 20 49 66 | 20 66 70 2d 3e 69 6e 6c |*.. * If| fp->inl|
|00002b50| 69 6e 65 64 20 69 73 20 | 4e 4f 2c 20 77 65 20 68 |ined is |NO, we h|
|00002b60| 61 76 65 20 74 6f 20 66 | 72 65 65 20 74 68 65 20 |ave to f|ree the |
|00002b70| 68 61 6e 64 6c 65 2e 0a | 09 20 2a 20 4e 6f 74 65 |handle..|. * Note|
|00002b80| 20 74 68 61 74 20 77 65 | 20 63 6f 70 69 65 64 20 | that we| copied |
|00002b90| 66 70 2d 3e 69 6e 6c 69 | 6e 65 64 20 69 6e 20 63 |fp->inli|ned in c|
|00002ba0| 61 73 65 20 69 74 20 69 | 73 20 59 45 53 2e 0a 09 |ase it i|s YES...|
|00002bb0| 20 2a 2f 0a 09 69 66 20 | 28 20 21 20 68 65 61 64 | */..if |( ! head|
|00002bc0| 65 72 5f 69 6e 6c 69 6e | 65 64 20 29 0a 09 09 66 |er_inlin|ed )...f|
|00002bd0| 72 65 65 28 20 28 63 68 | 61 72 20 2a 29 66 70 20 |ree( (ch|ar *)fp |
|00002be0| 29 20 3b 0a 7d 0a 0a 0a | 63 68 61 72 20 2a 5f 66 |) ;.}...|char *_f|
|00002bf0| 73 6d 5f 61 6c 6c 6f 63 | 28 20 66 70 20 29 0a 09 |sm_alloc|( fp )..|
|00002c00| 72 65 67 69 73 74 65 72 | 20 66 73 6d 61 5f 68 20 |register| fsma_h |
|00002c10| 66 70 20 3b 0a 7b 0a 09 | 72 65 67 69 73 74 65 72 |fp ;.{..|register|
|00002c20| 20 50 4f 49 4e 54 45 52 | 20 6f 62 6a 65 63 74 20 | POINTER| object |
|00002c30| 3b 0a 0a 09 2f 2a 0a 09 | 20 2a 20 43 68 65 63 6b |;.../*..| * Check|
|00002c40| 20 69 66 20 74 68 65 72 | 65 20 61 72 65 20 61 6e | if ther|e are an|
|00002c50| 79 20 73 6c 6f 74 73 20 | 6f 6e 20 74 68 65 20 66 |y slots |on the f|
|00002c60| 72 65 65 20 6c 69 73 74 | 0a 09 20 2a 2f 0a 09 69 |ree list|.. */..i|
|00002c70| 66 20 28 20 66 70 2d 3e | 6e 65 78 74 5f 66 72 65 |f ( fp->|next_fre|
|00002c80| 65 20 3d 3d 20 4e 55 4c | 4c 20 29 0a 09 7b 0a 09 |e == NUL|L )..{..|
|00002c90| 09 2f 2a 0a 09 09 20 2a | 20 46 72 65 65 20 6c 69 |./*... *| Free li|
|00002ca0| 73 74 20 65 78 68 61 75 | 73 74 65 64 3b 20 61 6c |st exhau|sted; al|
|00002cb0| 6c 6f 63 61 74 65 20 61 | 20 6e 65 77 20 63 68 75 |locate a| new chu|
|00002cc0| 6e 6b 0a 09 09 20 2a 2f | 0a 09 09 63 68 61 72 20 |nk... */|...char |
|00002cd0| 2a 73 6c 6f 74 73 20 3b | 0a 09 09 75 6e 69 6f 6e |*slots ;|...union|
|00002ce0| 20 5f 5f 66 73 6d 61 5f | 63 68 75 6e 6b 5f 68 65 | __fsma_|chunk_he|
|00002cf0| 61 64 65 72 20 2a 63 68 | 70 20 3b 0a 0a 09 09 63 |ader *ch|p ;....c|
|00002d00| 68 70 20 3d 20 43 48 55 | 4e 4b 5f 48 45 41 44 45 |hp = CHU|NK_HEADE|
|00002d10| 52 28 20 6d 61 6c 6c 6f | 63 28 20 66 70 2d 3e 63 |R( mallo|c( fp->c|
|00002d20| 68 75 6e 6b 5f 73 69 7a | 65 20 29 20 29 20 3b 0a |hunk_siz|e ) ) ;.|
|00002d30| 09 09 69 66 20 28 20 63 | 68 70 20 3d 3d 20 4e 55 |..if ( c|hp == NU|
|00002d40| 4c 4c 20 29 0a 09 09 09 | 69 66 20 28 20 66 70 2d |LL )....|if ( fp-|
|00002d50| 3e 66 6c 61 67 73 20 26 | 20 46 53 4d 5f 52 45 54 |>flags &| FSM_RET|
|00002d60| 55 52 4e 5f 45 52 52 4f | 52 20 29 0a 09 09 09 09 |URN_ERRO|R ).....|
|00002d70| 72 65 74 75 72 6e 28 20 | 4e 55 4c 4c 20 29 20 3b |return( |NULL ) ;|
|00002d80| 0a 09 09 09 65 6c 73 65 | 0a 09 09 09 09 74 65 72 |....else|.....ter|
|00002d90| 6d 69 6e 61 74 65 28 20 | 22 46 53 4d 41 20 66 73 |minate( |"FSMA fs|
|00002da0| 6d 5f 61 6c 6c 6f 63 3a | 20 6d 61 6c 6c 6f 63 20 |m_alloc:| malloc |
|00002db0| 66 61 69 6c 65 64 5c 6e | 22 20 29 20 3b 0a 0a 23 |failed\n|" ) ;..#|
|00002dc0| 69 66 64 65 66 20 44 45 | 42 55 47 0a 09 09 66 70 |ifdef DE|BUG...fp|
|00002dd0| 72 69 6e 74 66 28 20 73 | 74 64 65 72 72 2c 20 22 |rintf( s|tderr, "|
|00002de0| 41 6c 6c 6f 63 61 74 69 | 6e 67 20 63 68 75 6e 6b |Allocati|ng chunk|
|00002df0| 20 25 70 5c 6e 22 2c 20 | 63 68 75 6e 6b 20 29 20 | %p\n", |chunk ) |
|00002e00| 3b 0a 23 65 6e 64 69 66 | 0a 09 09 2f 2a 0a 09 09 |;.#endif|.../*...|
|00002e10| 20 2a 20 50 75 74 20 74 | 68 65 20 73 6c 6f 74 73 | * Put t|he slots|
|00002e20| 20 69 6e 20 74 68 69 73 | 20 63 68 75 6e 6b 20 69 | in this| chunk i|
|00002e30| 6e 20 61 20 6c 69 6e 6b | 65 64 20 6c 69 73 74 0a |n a link|ed list.|
|00002e40| 09 09 20 2a 20 61 6e 64 | 20 61 64 64 20 74 68 69 |.. * and| add thi|
|00002e50| 73 20 6c 69 73 74 20 74 | 6f 20 74 68 65 20 66 72 |s list t|o the fr|
|00002e60| 65 65 20 6c 69 73 74 0a | 09 09 20 2a 2f 0a 09 09 |ee list.|.. */...|
|00002e70| 73 6c 6f 74 73 20 3d 20 | 28 63 68 61 72 20 2a 29 |slots = |(char *)|
|00002e80| 20 26 63 68 70 5b 20 31 | 20 5d 20 3b 0a 09 09 69 | &chp[ 1| ] ;...i|
|00002e90| 6e 69 74 5f 66 72 65 65 | 5f 6c 69 73 74 28 20 66 |nit_free|_list( f|
|00002ea0| 70 2d 3e 73 6c 6f 74 73 | 5f 69 6e 5f 63 68 75 6e |p->slots|_in_chun|
|00002eb0| 6b 2c 20 66 70 2d 3e 73 | 6c 6f 74 5f 73 69 7a 65 |k, fp->s|lot_size|
|00002ec0| 2c 20 73 6c 6f 74 73 20 | 29 20 3b 0a 09 09 66 70 |, slots |) ;...fp|
|00002ed0| 2d 3e 6e 65 78 74 5f 66 | 72 65 65 20 3d 20 28 50 |->next_f|ree = (P|
|00002ee0| 4f 49 4e 54 45 52 29 20 | 73 6c 6f 74 73 20 3b 0a |OINTER) |slots ;.|
|00002ef0| 0a 09 09 2f 2a 0a 09 09 | 20 2a 20 50 75 74 20 74 |.../*...| * Put t|
|00002f00| 68 69 73 20 63 68 75 6e | 6b 20 61 74 20 74 68 65 |his chun|k at the|
|00002f10| 20 68 65 61 64 20 6f 66 | 20 74 68 65 20 63 68 75 | head of| the chu|
|00002f20| 6e 6b 20 63 68 61 69 6e | 0a 09 09 20 2a 2f 0a 09 |nk chain|... */..|
|00002f30| 09 63 68 70 2d 3e 6e 65 | 78 74 5f 63 68 75 6e 6b |.chp->ne|xt_chunk|
|00002f40| 20 3d 20 66 70 2d 3e 63 | 68 75 6e 6b 5f 63 68 61 | = fp->c|hunk_cha|
|00002f50| 69 6e 20 3b 0a 09 09 66 | 70 2d 3e 63 68 75 6e 6b |in ;...f|p->chunk|
|00002f60| 5f 63 68 61 69 6e 20 3d | 20 63 68 70 20 3b 0a 09 |_chain =| chp ;..|
|00002f70| 7d 0a 0a 09 6f 62 6a 65 | 63 74 20 3d 20 66 70 2d |}...obje|ct = fp-|
|00002f80| 3e 6e 65 78 74 5f 66 72 | 65 65 20 3b 0a 09 66 70 |>next_fr|ee ;..fp|
|00002f90| 2d 3e 6e 65 78 74 5f 66 | 72 65 65 20 3d 20 2a 28 |->next_f|ree = *(|
|00002fa0| 50 4f 49 4e 54 45 52 20 | 2a 29 6f 62 6a 65 63 74 |POINTER |*)object|
|00002fb0| 20 3b 0a 0a 09 69 66 20 | 28 20 66 70 2d 3e 66 6c | ;...if |( fp->fl|
|00002fc0| 61 67 73 20 26 20 46 53 | 4d 5f 5a 45 52 4f 5f 41 |ags & FS|M_ZERO_A|
|00002fd0| 4c 4c 4f 43 20 29 0a 09 | 09 28 76 6f 69 64 29 20 |LLOC )..|.(void) |
|00002fe0| 6d 65 6d 73 65 74 28 20 | 6f 62 6a 65 63 74 2c 20 |memset( |object, |
|00002ff0| 30 2c 20 66 70 2d 3e 73 | 6c 6f 74 5f 73 69 7a 65 |0, fp->s|lot_size|
|00003000| 20 29 20 3b 0a 0a 09 72 | 65 74 75 72 6e 28 20 6f | ) ;...r|eturn( o|
|00003010| 62 6a 65 63 74 20 29 20 | 3b 0a 7d 0a 0a 0a 76 6f |bject ) |;.}...vo|
|00003020| 69 64 20 5f 66 73 6d 5f | 66 72 65 65 28 20 66 70 |id _fsm_|free( fp|
|00003030| 2c 20 6f 62 6a 65 63 74 | 20 29 0a 09 66 73 6d 61 |, object| )..fsma|
|00003040| 5f 68 20 66 70 20 3b 0a | 09 63 68 61 72 20 2a 6f |_h fp ;.|.char *o|
|00003050| 62 6a 65 63 74 20 3b 0a | 7b 0a 09 69 66 20 28 20 |bject ;.|{..if ( |
|00003060| 66 70 2d 3e 66 6c 61 67 | 73 20 26 20 46 53 4d 5f |fp->flag|s & FSM_|
|00003070| 5a 45 52 4f 5f 46 52 45 | 45 20 29 0a 09 09 28 76 |ZERO_FRE|E )...(v|
|00003080| 6f 69 64 29 20 6d 65 6d | 73 65 74 28 20 6f 62 6a |oid) mem|set( obj|
|00003090| 65 63 74 2c 20 30 2c 20 | 66 70 2d 3e 73 6c 6f 74 |ect, 0, |fp->slot|
|000030a0| 5f 73 69 7a 65 20 29 20 | 3b 0a 0a 09 2a 28 50 4f |_size ) |;...*(PO|
|000030b0| 49 4e 54 45 52 20 2a 29 | 6f 62 6a 65 63 74 20 3d |INTER *)|object =|
|000030c0| 20 66 70 2d 3e 6e 65 78 | 74 5f 66 72 65 65 20 3b | fp->nex|t_free ;|
|000030d0| 0a 09 66 70 2d 3e 6e 65 | 78 74 5f 66 72 65 65 20 |..fp->ne|xt_free |
|000030e0| 3d 20 6f 62 6a 65 63 74 | 20 3b 0a 7d 0a 0a 0a 50 |= object| ;.}...P|
|000030f0| 52 49 56 41 54 45 20 76 | 6f 69 64 20 74 65 72 6d |RIVATE v|oid term|
|00003100| 69 6e 61 74 65 28 20 73 | 20 29 0a 09 63 68 61 72 |inate( s| )..char|
|00003110| 20 2a 73 20 3b 0a 7b 0a | 09 77 72 69 74 65 28 20 | *s ;.{.|.write( |
|00003120| 32 2c 20 73 2c 20 73 74 | 72 6c 65 6e 28 20 73 20 |2, s, st|rlen( s |
|00003130| 29 20 29 20 3b 0a 09 61 | 62 6f 72 74 28 29 20 3b |) ) ;..a|bort() ;|
|00003140| 0a 09 65 78 69 74 28 20 | 31 20 29 20 3b 0a 7d 0a |..exit( |1 ) ;.}.|
|00003150| 0a 0a 50 52 49 56 41 54 | 45 20 76 6f 69 64 20 69 |..PRIVAT|E void i|
|00003160| 6e 69 74 5f 66 72 65 65 | 5f 6c 69 73 74 28 20 6e |nit_free|_list( n|
|00003170| 73 6c 6f 74 73 2c 20 73 | 69 7a 65 2c 20 73 6c 6f |slots, s|ize, slo|
|00003180| 74 73 20 29 0a 09 75 6e | 73 69 67 6e 65 64 20 6e |ts )..un|signed n|
|00003190| 73 6c 6f 74 73 20 3b 0a | 09 72 65 67 69 73 74 65 |slots ;.|.registe|
|000031a0| 72 20 75 6e 73 69 67 6e | 65 64 20 73 69 7a 65 20 |r unsign|ed size |
|000031b0| 3b 0a 09 63 68 61 72 20 | 2a 73 6c 6f 74 73 20 3b |;..char |*slots ;|
|000031c0| 0a 7b 0a 09 72 65 67 69 | 73 74 65 72 20 69 6e 74 |.{..regi|ster int|
|000031d0| 20 69 20 3b 0a 09 72 65 | 67 69 73 74 65 72 20 63 | i ;..re|gister c|
|000031e0| 68 61 72 20 2a 6e 65 78 | 74 20 3b 0a 09 72 65 67 |har *nex|t ;..reg|
|000031f0| 69 73 74 65 72 20 50 4f | 49 4e 54 45 52 20 63 75 |ister PO|INTER cu|
|00003200| 72 72 65 6e 74 20 3b 0a | 0a 09 66 6f 72 20 28 20 |rrent ;.|..for ( |
|00003210| 69 20 3d 20 30 2c 20 63 | 75 72 72 65 6e 74 20 3d |i = 0, c|urrent =|
|00003220| 20 73 6c 6f 74 73 2c 20 | 6e 65 78 74 20 3d 20 73 | slots, |next = s|
|00003230| 6c 6f 74 73 20 2b 20 73 | 69 7a 65 20 3b 20 69 20 |lots + s|ize ; i |
|00003240| 3c 20 6e 73 6c 6f 74 73 | 20 2d 20 31 20 3b 0a 09 |< nslots| - 1 ;..|
|00003250| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 69 2b 2b |........|.....i++|
|00003260| 2c 20 63 75 72 72 65 6e | 74 20 3d 20 6e 65 78 74 |, curren|t = next|
|00003270| 2c 20 6e 65 78 74 20 2b | 3d 20 73 69 7a 65 20 29 |, next +|= size )|
|00003280| 0a 09 09 2a 28 50 4f 49 | 4e 54 45 52 20 2a 29 63 |...*(POI|NTER *)c|
|00003290| 75 72 72 65 6e 74 20 3d | 20 6e 65 78 74 20 3b 0a |urrent =| next ;.|
|000032a0| 09 2a 28 50 4f 49 4e 54 | 45 52 20 2a 29 63 75 72 |.*(POINT|ER *)cur|
|000032b0| 72 65 6e 74 20 3d 20 4e | 55 4c 4c 20 3b 0a 7d 0a |rent = N|ULL ;.}.|
|000032c0| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 2e 2f 66 73 6d 61 2e 68 | 00 00 00 00 00 00 00 00 |./fsma.h|........|
|00003410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00003470| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00003480| 20 20 20 33 37 35 32 20 | 20 35 32 37 37 34 30 37 | 3752 | 5277407|
|00003490| 32 32 32 20 20 20 35 33 | 36 33 00 20 00 00 00 00 |222 53|63. ....|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 2f 2a 0a 20 2a 20 28 63 | 29 20 43 6f 70 79 72 69 |/*. * (c|) Copyri|
|00003610| 67 68 74 20 31 39 39 32 | 20 62 79 20 50 61 6e 61 |ght 1992| by Pana|
|00003620| 67 69 6f 74 69 73 20 54 | 73 69 72 69 67 6f 74 69 |giotis T|sirigoti|
|00003630| 73 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |s. * All| rights |
|00003640| 72 65 73 65 72 76 65 64 | 2e 20 20 54 68 65 20 66 |reserved|. The f|
|00003650| 69 6c 65 20 6e 61 6d 65 | 64 20 43 4f 50 59 52 49 |ile name|d COPYRI|
|00003660| 47 48 54 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |GHT spec|ifies th|
|00003670| 65 20 74 65 72 6d 73 20 | 0a 20 2a 20 61 6e 64 20 |e terms |. * and |
|00003680| 63 6f 6e 64 69 74 69 6f | 6e 73 20 66 6f 72 20 72 |conditio|ns for r|
|00003690| 65 64 69 73 74 72 69 62 | 75 74 69 6f 6e 2e 0a 20 |edistrib|ution.. |
|000036a0| 2a 2f 0a 0a 23 69 66 6e | 64 65 66 20 5f 5f 46 53 |*/..#ifn|def __FS|
|000036b0| 4d 41 5f 48 0a 23 64 65 | 66 69 6e 65 20 5f 5f 46 |MA_H.#de|fine __F|
|000036c0| 53 4d 41 5f 48 0a 0a 2f | 2a 0a 20 2a 20 24 49 64 |SMA_H../|*. * $Id|
|000036d0| 3a 20 66 73 6d 61 2e 68 | 2c 76 20 35 2e 34 20 31 |: fsma.h|,v 5.4 1|
|000036e0| 39 39 32 2f 31 30 2f 32 | 30 20 32 31 3a 32 30 3a |992/10/2|0 21:20:|
|000036f0| 33 34 20 70 61 6e 6f 73 | 20 45 78 70 20 24 0a 20 |34 panos| Exp $. |
|00003700| 2a 2f 0a 0a 23 64 65 66 | 69 6e 65 20 5f 5f 46 53 |*/..#def|ine __FS|
|00003710| 4d 41 5f 41 4c 49 47 4e | 4d 45 4e 54 09 09 09 09 |MA_ALIGN|MENT....|
|00003720| 09 38 0a 0a 75 6e 69 6f | 6e 20 5f 5f 66 73 6d 61 |.8..unio|n __fsma|
|00003730| 5f 63 68 75 6e 6b 5f 68 | 65 61 64 65 72 0a 7b 0a |_chunk_h|eader.{.|
|00003740| 09 75 6e 69 6f 6e 20 5f | 5f 66 73 6d 61 5f 63 68 |.union _|_fsma_ch|
|00003750| 75 6e 6b 5f 68 65 61 64 | 65 72 20 2a 6e 65 78 74 |unk_head|er *next|
|00003760| 5f 63 68 75 6e 6b 20 3b | 0a 09 63 68 61 72 20 62 |_chunk ;|..char b|
|00003770| 79 74 65 73 5b 20 5f 5f | 46 53 4d 41 5f 41 4c 49 |ytes[ __|FSMA_ALI|
|00003780| 47 4e 4d 45 4e 54 20 5d | 20 3b 0a 7d 20 3b 0a 0a |GNMENT ]| ;.} ;..|
|00003790| 74 79 70 65 64 65 66 20 | 63 68 61 72 20 2a 5f 5f |typedef |char *__|
|000037a0| 66 73 6d 61 5f 70 6f 69 | 6e 74 65 72 20 3b 0a 0a |fsma_poi|nter ;..|
|000037b0| 73 74 72 75 63 74 20 5f | 5f 66 73 6d 61 5f 68 65 |struct _|_fsma_he|
|000037c0| 61 64 65 72 0a 7b 0a 09 | 75 6e 69 6f 6e 20 5f 5f |ader.{..|union __|
|000037d0| 66 73 6d 61 5f 63 68 75 | 6e 6b 5f 68 65 61 64 65 |fsma_chu|nk_heade|
|000037e0| 72 20 2a 63 68 75 6e 6b | 5f 63 68 61 69 6e 20 3b |r *chunk|_chain ;|
|000037f0| 0a 09 5f 5f 66 73 6d 61 | 5f 70 6f 69 6e 74 65 72 |..__fsma|_pointer|
|00003800| 20 6e 65 78 74 5f 66 72 | 65 65 20 3b 0a 09 5f 5f | next_fr|ee ;..__|
|00003810| 66 73 6d 61 5f 70 6f 69 | 6e 74 65 72 20 74 65 6d |fsma_poi|nter tem|
|00003820| 70 20 3b 0a 09 75 6e 73 | 69 67 6e 65 64 20 73 6c |p ;..uns|igned sl|
|00003830| 6f 74 73 5f 69 6e 5f 63 | 68 75 6e 6b 20 3b 0a 09 |ots_in_c|hunk ;..|
|00003840| 75 6e 73 69 67 6e 65 64 | 20 73 6c 6f 74 5f 73 69 |unsigned| slot_si|
|00003850| 7a 65 20 3b 0a 09 75 6e | 73 69 67 6e 65 64 20 63 |ze ;..un|signed c|
|00003860| 68 75 6e 6b 5f 73 69 7a | 65 20 3b 0a 09 69 6e 74 |hunk_siz|e ;..int|
|00003870| 20 66 6c 61 67 73 20 3b | 0a 09 69 6e 74 20 69 73 | flags ;|..int is|
|00003880| 5f 69 6e 6c 69 6e 65 64 | 20 3b 09 09 09 09 09 09 |_inlined| ;......|
|00003890| 2f 2a 20 68 65 61 64 65 | 72 20 69 73 20 69 6e 6c |/* heade|r is inl|
|000038a0| 69 6e 65 64 20 28 62 6f | 6f 6c 65 61 6e 29 09 2a |ined (bo|olean).*|
|000038b0| 2f 0a 7d 20 3b 0a 0a 74 | 79 70 65 64 65 66 20 73 |/.} ;..t|ypedef s|
|000038c0| 74 72 75 63 74 20 5f 5f | 66 73 6d 61 5f 68 65 61 |truct __|fsma_hea|
|000038d0| 64 65 72 20 2a 66 73 6d | 61 5f 68 20 3b 0a 0a 2f |der *fsm|a_h ;../|
|000038e0| 2a 0a 20 2a 20 46 6c 61 | 67 73 0a 20 2a 2f 0a 23 |*. * Fla|gs. */.#|
|000038f0| 64 65 66 69 6e 65 20 46 | 53 4d 5f 4e 4f 46 4c 41 |define F|SM_NOFLA|
|00003900| 47 53 09 09 09 09 09 30 | 78 30 0a 23 64 65 66 69 |GS.....0|x0.#defi|
|00003910| 6e 65 20 46 53 4d 5f 52 | 45 54 55 52 4e 5f 45 52 |ne FSM_R|ETURN_ER|
|00003920| 52 4f 52 09 09 09 30 78 | 31 0a 23 64 65 66 69 6e |ROR...0x|1.#defin|
|00003930| 65 20 46 53 4d 5f 5a 45 | 52 4f 5f 41 4c 4c 4f 43 |e FSM_ZE|RO_ALLOC|
|00003940| 09 09 09 09 30 78 32 0a | 23 64 65 66 69 6e 65 20 |....0x2.|#define |
|00003950| 46 53 4d 5f 5a 45 52 4f | 5f 46 52 45 45 09 09 09 |FSM_ZERO|_FREE...|
|00003960| 09 30 78 34 0a 23 64 65 | 66 69 6e 65 20 46 53 4d |.0x4.#de|fine FSM|
|00003970| 5f 5a 45 52 4f 5f 44 45 | 53 54 52 4f 59 09 09 09 |_ZERO_DE|STROY...|
|00003980| 30 78 38 0a 0a 0a 2f 2a | 0a 20 2a 20 49 4e 54 45 |0x8.../*|. * INTE|
|00003990| 52 46 41 43 45 0a 20 2a | 2f 0a 0a 23 69 66 64 65 |RFACE. *|/..#ifde|
|000039a0| 66 20 5f 5f 41 52 47 53 | 0a 23 75 6e 64 65 66 20 |f __ARGS|.#undef |
|000039b0| 5f 5f 41 52 47 53 0a 23 | 65 6e 64 69 66 0a 0a 23 |__ARGS.#|endif..#|
|000039c0| 69 66 64 65 66 20 50 52 | 4f 54 4f 54 59 50 45 53 |ifdef PR|OTOTYPES|
|000039d0| 0a 23 20 20 64 65 66 69 | 6e 65 20 5f 5f 41 52 47 |.# defi|ne __ARG|
|000039e0| 53 28 20 73 20 29 20 20 | 20 20 20 20 20 20 20 20 |S( s ) | |
|000039f0| 20 20 20 20 20 73 0a 23 | 65 6c 73 65 0a 23 20 20 | s.#|else.# |
|00003a00| 64 65 66 69 6e 65 20 5f | 5f 41 52 47 53 28 20 73 |define _|_ARGS( s|
|00003a10| 20 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | ) | |
|00003a20| 20 28 29 0a 23 65 6e 64 | 69 66 0a 0a 66 73 6d 61 | ().#end|if..fsma|
|00003a30| 5f 68 20 66 73 6d 5f 63 | 72 65 61 74 65 20 5f 5f |_h fsm_c|reate __|
|00003a40| 41 52 47 53 28 20 28 20 | 75 6e 73 69 67 6e 65 64 |ARGS( ( |unsigned|
|00003a50| 20 73 69 7a 65 2c 20 75 | 6e 73 69 67 6e 65 64 20 | size, u|nsigned |
|00003a60| 73 6c 6f 74 73 2c 20 69 | 6e 74 20 66 6c 61 67 73 |slots, i|nt flags|
|00003a70| 20 29 20 29 20 3b 0a 76 | 6f 69 64 20 66 73 6d 5f | ) ) ;.v|oid fsm_|
|00003a80| 64 65 73 74 72 6f 79 20 | 5f 5f 41 52 47 53 28 20 |destroy |__ARGS( |
|00003a90| 28 20 66 73 6d 61 5f 68 | 20 68 61 6e 64 6c 65 20 |( fsma_h| handle |
|00003aa0| 29 20 29 20 3b 0a 63 68 | 61 72 20 2a 5f 66 73 6d |) ) ;.ch|ar *_fsm|
|00003ab0| 5f 61 6c 6c 6f 63 20 5f | 5f 41 52 47 53 28 20 28 |_alloc _|_ARGS( (|
|00003ac0| 20 66 73 6d 61 5f 68 20 | 68 61 6e 64 6c 65 20 29 | fsma_h |handle )|
|00003ad0| 20 29 20 3b 0a 76 6f 69 | 64 20 5f 66 73 6d 5f 66 | ) ;.voi|d _fsm_f|
|00003ae0| 72 65 65 20 5f 5f 41 52 | 47 53 28 20 28 20 66 73 |ree __AR|GS( ( fs|
|00003af0| 6d 61 5f 68 20 68 61 6e | 64 6c 65 2c 20 63 68 61 |ma_h han|dle, cha|
|00003b00| 72 20 2a 70 74 72 20 29 | 20 29 20 3b 0a 0a 23 64 |r *ptr )| ) ;..#d|
|00003b10| 65 66 69 6e 65 20 66 73 | 6d 5f 61 6c 6c 6f 63 28 |efine fs|m_alloc(|
|00003b20| 20 66 73 6d 61 20 29 09 | 09 09 09 09 09 09 09 09 | fsma ).|........|
|00003b30| 09 09 09 09 09 09 09 5c | 0a 09 28 09 09 09 09 09 |.......\|..(.....|
|00003b40| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00003b50| 09 09 5c 0a 09 09 28 20 | 21 20 28 66 73 6d 61 29 |..\...( |! (fsma)|
|00003b60| 2d 3e 6e 65 78 74 5f 66 | 72 65 65 20 7c 7c 20 28 |->next_f|ree || (|
|00003b70| 66 73 6d 61 29 2d 3e 66 | 6c 61 67 73 20 26 20 46 |fsma)->f|lags & F|
|00003b80| 53 4d 5f 5a 45 52 4f 5f | 41 4c 4c 4f 43 20 29 20 |SM_ZERO_|ALLOC ) |
|00003b90| 20 20 20 20 20 20 20 20 | 5c 0a 09 09 09 3f 20 5f | |\....? _|
|00003ba0| 66 73 6d 5f 61 6c 6c 6f | 63 28 20 66 73 6d 61 20 |fsm_allo|c( fsma |
|00003bb0| 29 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |).......|........|
|00003bc0| 5c 0a 09 09 09 3a 20 28 | 28 66 73 6d 61 29 2d 3e |\....: (|(fsma)->|
|00003bd0| 74 65 6d 70 20 3d 20 28 | 66 73 6d 61 29 2d 3e 6e |temp = (|fsma)->n|
|00003be0| 65 78 74 5f 66 72 65 65 | 2c 20 20 20 20 20 20 20 |ext_free|, |
|00003bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c00| 20 20 20 20 5c 0a 09 09 | 09 09 28 66 73 6d 61 29 | \...|..(fsma)|
|00003c10| 2d 3e 6e 65 78 74 5f 66 | 72 65 65 20 3d 20 2a 28 |->next_f|ree = *(|
|00003c20| 5f 5f 66 73 6d 61 5f 70 | 6f 69 6e 74 65 72 20 2a |__fsma_p|ointer *|
|00003c30| 29 20 28 66 73 6d 61 29 | 2d 3e 6e 65 78 74 5f 66 |) (fsma)|->next_f|
|00003c40| 72 65 65 2c 20 20 5c 0a | 09 09 09 09 28 63 68 61 |ree, \.|....(cha|
|00003c50| 72 20 2a 29 20 28 66 73 | 6d 61 29 2d 3e 74 65 6d |r *) (fs|ma)->tem|
|00003c60| 70 29 09 09 09 09 09 09 | 09 09 09 09 09 09 09 5c |p)......|.......\|
|00003c70| 0a 09 29 0a 0a 23 64 65 | 66 69 6e 65 20 66 73 6d |..)..#de|fine fsm|
|00003c80| 5f 66 72 65 65 28 20 66 | 73 6d 61 2c 20 70 20 29 |_free( f|sma, p )|
|00003c90| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 5c |........|.......\|
|00003ca0| 0a 09 09 09 69 66 20 28 | 20 28 66 73 6d 61 29 2d |....if (| (fsma)-|
|00003cb0| 3e 66 6c 61 67 73 20 26 | 20 46 53 4d 5f 5a 45 52 |>flags &| FSM_ZER|
|00003cc0| 4f 5f 46 52 45 45 20 29 | 09 09 09 09 09 09 09 09 |O_FREE )|........|
|00003cd0| 09 5c 0a 09 09 09 09 5f | 66 73 6d 5f 66 72 65 65 |.\....._|fsm_free|
|00003ce0| 28 20 66 73 6d 61 2c 20 | 70 20 29 09 3b 09 09 09 |( fsma, |p ).;...|
|00003cf0| 09 09 09 09 09 09 09 09 | 09 09 5c 0a 09 09 09 65 |........|..\....e|
|00003d00| 6c 73 65 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |lse.....|........|
|00003d10| 09 09 09 09 09 09 09 5c | 0a 09 09 09 09 28 66 73 |.......\|.....(fs|
|00003d20| 6d 61 29 2d 3e 74 65 6d | 70 20 3d 20 28 70 29 2c |ma)->tem|p = (p),|
|00003d30| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 5c 0a |........|......\.|
|00003d40| 09 09 09 09 2a 28 5f 5f | 66 73 6d 61 5f 70 6f 69 |....*(__|fsma_poi|
|00003d50| 6e 74 65 72 20 2a 29 20 | 28 66 73 6d 61 29 2d 3e |nter *) |(fsma)->|
|00003d60| 74 65 6d 70 20 3d 20 28 | 66 73 6d 61 29 2d 3e 6e |temp = (|fsma)->n|
|00003d70| 65 78 74 5f 66 72 65 65 | 2c 20 09 09 5c 0a 09 09 |ext_free|, ..\...|
|00003d80| 09 09 28 66 73 6d 61 29 | 2d 3e 6e 65 78 74 5f 66 |..(fsma)|->next_f|
|00003d90| 72 65 65 20 3d 20 28 66 | 73 6d 61 29 2d 3e 74 65 |ree = (f|sma)->te|
|00003da0| 6d 70 0a 0a 23 64 65 66 | 69 6e 65 20 66 73 6d 5f |mp..#def|ine fsm_|
|00003db0| 73 69 7a 65 28 20 66 73 | 6d 61 20 29 09 09 09 28 |size( fs|ma )...(|
|00003dc0| 66 73 6d 61 29 2d 3e 73 | 6c 6f 74 5f 73 69 7a 65 |fsma)->s|lot_size|
|00003dd0| 0a 0a 23 65 6e 64 69 66 | 20 09 2f 2a 20 5f 5f 46 |..#endif| ./* __F|
|00003de0| 53 4d 41 5f 48 20 2a 2f | 0a 0a 5f 69 6e 5f 63 68 |SMA_H */|.._in_ch|
|00003df0| 75 6e 6b 20 3d 20 6e 73 | 6c 6f 74 73 20 3b 0a 09 |unk = ns|lots ;..|
|00003e00| 2e 2f 69 6d 70 6c 2e 68 | 00 00 00 00 00 00 00 00 |./impl.h|........|
|00003e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e60| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00003e70| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00003e80| 20 20 20 31 30 37 34 20 | 20 35 32 37 37 34 30 37 | 1074 | 5277407|
|00003e90| 32 32 32 20 20 20 35 33 | 37 31 00 20 00 00 00 00 |222 53|71. ....|
|00003ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004000| 2f 2a 0a 20 2a 20 28 63 | 29 20 43 6f 70 79 72 69 |/*. * (c|) Copyri|
|00004010| 67 68 74 20 31 39 39 32 | 20 62 79 20 50 61 6e 61 |ght 1992| by Pana|
|00004020| 67 69 6f 74 69 73 20 54 | 73 69 72 69 67 6f 74 69 |giotis T|sirigoti|
|00004030| 73 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |s. * All| rights |
|00004040| 72 65 73 65 72 76 65 64 | 2e 20 20 54 68 65 20 66 |reserved|. The f|
|00004050| 69 6c 65 20 6e 61 6d 65 | 64 20 43 4f 50 59 52 49 |ile name|d COPYRI|
|00004060| 47 48 54 20 73 70 65 63 | 69 66 69 65 73 20 74 68 |GHT spec|ifies th|
|00004070| 65 20 74 65 72 6d 73 20 | 0a 20 2a 20 61 6e 64 20 |e terms |. * and |
|00004080| 63 6f 6e 64 69 74 69 6f | 6e 73 20 66 6f 72 20 72 |conditio|ns for r|
|00004090| 65 64 69 73 74 72 69 62 | 75 74 69 6f 6e 2e 0a 20 |edistrib|ution.. |
|000040a0| 2a 2f 0a 0a 2f 2a 0a 20 | 2a 20 24 49 64 3a 20 69 |*/../*. |* $Id: i|
|000040b0| 6d 70 6c 2e 68 2c 76 20 | 35 2e 31 20 31 39 39 32 |mpl.h,v |5.1 1992|
|000040c0| 2f 31 30 2f 31 30 20 30 | 37 3a 32 33 3a 31 38 20 |/10/10 0|7:23:18 |
|000040d0| 70 61 6e 6f 73 20 45 78 | 70 20 24 0a 20 2a 2f 0a |panos Ex|p $. */.|
|000040e0| 0a 23 69 66 6e 64 65 66 | 20 4e 55 4c 4c 0a 23 64 |.#ifndef| NULL.#d|
|000040f0| 65 66 69 6e 65 20 4e 55 | 4c 4c 20 30 0a 23 65 6e |efine NU|LL 0.#en|
|00004100| 64 69 66 0a 0a 23 69 66 | 6e 64 65 66 20 46 41 4c |dif..#if|ndef FAL|
|00004110| 53 45 0a 23 64 65 66 69 | 6e 65 20 46 41 4c 53 45 |SE.#defi|ne FALSE|
|00004120| 20 20 20 20 20 30 0a 23 | 64 65 66 69 6e 65 20 54 | 0.#|define T|
|00004130| 52 55 45 20 20 20 20 20 | 20 31 0a 23 65 6e 64 69 |RUE | 1.#endi|
|00004140| 66 0a 0a 23 64 65 66 69 | 6e 65 20 50 52 49 56 41 |f..#defi|ne PRIVA|
|00004150| 54 45 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |TE | |
|00004160| 20 20 20 20 20 20 20 73 | 74 61 74 69 63 0a 0a 23 | s|tatic..#|
|00004170| 64 65 66 69 6e 65 20 53 | 4c 4f 54 53 5f 50 45 52 |define S|LOTS_PER|
|00004180| 5f 43 48 55 4e 4b 20 20 | 20 20 20 20 20 20 20 20 |_CHUNK | |
|00004190| 20 20 20 31 30 30 0a 0a | 23 64 65 66 69 6e 65 20 | 100..|#define |
|000041a0| 50 4f 49 4e 54 45 52 09 | 09 09 09 09 09 09 5f 5f |POINTER.|......__|
|000041b0| 66 73 6d 61 5f 70 6f 69 | 6e 74 65 72 0a 23 64 65 |fsma_poi|nter.#de|
|000041c0| 66 69 6e 65 20 4d 49 4e | 53 49 5a 45 20 20 20 20 |fine MIN|SIZE |
|000041d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000041e0| 20 73 69 7a 65 6f 66 28 | 20 50 4f 49 4e 54 45 52 | sizeof(| POINTER|
|000041f0| 20 29 0a 0a 23 64 65 66 | 69 6e 65 20 43 48 55 4e | )..#def|ine CHUN|
|00004200| 4b 5f 48 45 41 44 45 52 | 28 20 70 20 29 20 20 20 |K_HEADER|( p ) |
|00004210| 20 20 20 20 20 20 20 20 | 28 28 75 6e 69 6f 6e 20 | |((union |
|00004220| 5f 5f 66 73 6d 61 5f 63 | 68 75 6e 6b 5f 68 65 61 |__fsma_c|hunk_hea|
|00004230| 64 65 72 20 2a 29 28 70 | 29 29 0a 0a 20 3b 0a 09 |der *)(p|)).. ;..|
|00004240| 75 6e 73 69 67 6e 65 64 | 20 73 6c 6f 74 5f 73 69 |unsigned| slot_si|
|00004250| 7a 65 20 3b 0a 09 75 6e | 73 69 67 6e 65 64 20 63 |ze ;..un|signed c|
|00004260| 68 75 6e 6b 5f 73 69 7a | 65 20 3b 0a 09 69 6e 74 |hunk_siz|e ;..int|
|00004270| 20 66 6c 61 67 73 20 3b | 0a 09 69 6e 74 20 69 73 | flags ;|..int is|
|00004280| 5f 69 6e 6c 69 6e 65 64 | 20 3b 09 09 09 09 09 09 |_inlined| ;......|
|00004290| 2f 2a 20 68 65 61 64 65 | 72 20 69 73 20 69 6e 6c |/* heade|r is inl|
|000042a0| 69 6e 65 64 20 28 62 6f | 6f 6c 65 61 6e 29 09 2a |ined (bo|olean).*|
|000042b0| 2f 0a 7d 20 3b 0a 0a 74 | 79 70 65 64 65 66 20 73 |/.} ;..t|ypedef s|
|000042c0| 74 72 75 63 74 20 5f 5f | 66 73 6d 61 5f 68 65 61 |truct __|fsma_hea|
|000042d0| 64 65 72 20 2a 66 73 6d | 61 5f 68 20 3b 0a 0a 2f |der *fsm|a_h ;../|
|000042e0| 2a 0a 20 2a 20 46 6c 61 | 67 73 0a 20 2a 2f 0a 23 |*. * Fla|gs. */.#|
|000042f0| 64 65 66 69 6e 65 20 46 | 53 4d 5f 4e 4f 46 4c 41 |define F|SM_NOFLA|
|00004300| 47 53 09 09 09 09 09 30 | 78 30 0a 23 64 65 66 69 |GS.....0|x0.#defi|
|00004310| 6e 65 20 46 53 4d 5f 52 | 45 54 55 52 4e 5f 45 52 |ne FSM_R|ETURN_ER|
|00004320| 52 4f 52 09 09 09 30 78 | 31 0a 23 64 65 66 69 6e |ROR...0x|1.#defin|
|00004330| 65 20 46 53 4d 5f 5a 45 | 52 4f 5f 41 4c 4c 4f 43 |e FSM_ZE|RO_ALLOC|
|00004340| 09 09 09 09 30 78 32 0a | 23 64 65 66 69 6e 65 20 |....0x2.|#define |
|00004350| 46 53 4d 5f 5a 45 52 4f | 5f 46 52 45 45 09 09 09 |FSM_ZERO|_FREE...|
|00004360| 09 30 78 34 0a 23 64 65 | 66 69 6e 65 20 46 53 4d |.0x4.#de|fine FSM|
|00004370| 5f 5a 45 52 4f 5f 44 45 | 53 54 52 4f 59 09 09 09 |_ZERO_DE|STROY...|
|00004380| 30 78 38 0a 0a 0a 2f 2a | 0a 20 2a 20 49 4e 54 45 |0x8.../*|. * INTE|
|00004390| 52 46 41 43 45 0a 20 2a | 2f 0a 0a 23 69 66 64 65 |RFACE. *|/..#ifde|
|000043a0| 66 20 5f 5f 41 52 47 53 | 0a 23 75 6e 64 65 66 20 |f __ARGS|.#undef |
|000043b0| 5f 5f 41 52 47 53 0a 23 | 65 6e 64 69 66 0a 0a 23 |__ARGS.#|endif..#|
|000043c0| 69 66 64 65 66 20 50 52 | 4f 54 4f 54 59 50 45 53 |ifdef PR|OTOTYPES|
|000043d0| 0a 23 20 20 64 65 66 69 | 6e 65 20 5f 5f 41 52 47 |.# defi|ne __ARG|
|000043e0| 53 28 20 73 20 29 20 20 | 20 20 20 20 20 20 20 20 |S( s ) | |
|000043f0| 20 20 20 20 20 73 0a 23 | 65 6c 73 65 0a 23 20 20 | s.#|else.# |
|00004400| 2e 2f 66 73 6d 61 2e 33 | 00 00 00 00 00 00 00 00 |./fsma.3|........|
|00004410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00004470| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00004480| 20 20 20 36 32 33 33 20 | 20 35 32 37 37 34 30 37 | 6233 | 5277407|
|00004490| 32 32 31 20 20 20 35 32 | 37 32 00 20 00 00 00 00 |221 52|72. ....|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004600| 2e 5c 22 28 63 29 20 43 | 6f 70 79 72 69 67 68 74 |.\"(c) C|opyright|
|00004610| 20 31 39 39 32 20 62 79 | 20 50 61 6e 61 67 69 6f | 1992 by| Panagio|
|00004620| 74 69 73 20 54 73 69 72 | 69 67 6f 74 69 73 0a 2e |tis Tsir|igotis..|
|00004630| 5c 22 41 6c 6c 20 72 69 | 67 68 74 73 20 72 65 73 |\"All ri|ghts res|
|00004640| 65 72 76 65 64 2e 20 20 | 54 68 65 20 66 69 6c 65 |erved. |The file|
|00004650| 20 6e 61 6d 65 64 20 43 | 4f 50 59 52 49 47 48 54 | named C|OPYRIGHT|
|00004660| 20 73 70 65 63 69 66 69 | 65 73 20 74 68 65 20 74 | specifi|es the t|
|00004670| 65 72 6d 73 20 0a 2e 5c | 22 61 6e 64 20 63 6f 6e |erms ..\|"and con|
|00004680| 64 69 74 69 6f 6e 73 20 | 66 6f 72 20 72 65 64 69 |ditions |for redi|
|00004690| 73 74 72 69 62 75 74 69 | 6f 6e 2e 0a 2e 5c 22 0a |stributi|on...\".|
|000046a0| 2e 5c 22 20 24 49 64 3a | 20 66 73 6d 61 2e 33 2c |.\" $Id:| fsma.3,|
|000046b0| 76 20 35 2e 31 20 31 39 | 39 32 2f 31 30 2f 31 30 |v 5.1 19|92/10/10|
|000046c0| 20 30 37 3a 32 33 3a 31 | 38 20 70 61 6e 6f 73 20 | 07:23:1|8 panos |
|000046d0| 45 78 70 20 24 0a 2e 54 | 48 20 46 53 4d 41 20 33 |Exp $..T|H FSMA 3|
|000046e0| 58 20 22 31 30 20 4f 63 | 74 6f 62 65 72 20 31 39 |X "10 Oc|tober 19|
|000046f0| 39 32 22 0a 2e 53 48 20 | 4e 41 4d 45 0a 66 73 6d |92"..SH |NAME.fsm|
|00004700| 5f 63 72 65 61 74 65 2c | 20 66 73 6d 5f 64 65 73 |_create,| fsm_des|
|00004710| 74 72 6f 79 2c 20 66 73 | 6d 5f 61 6c 6c 6f 63 2c |troy, fs|m_alloc,|
|00004720| 20 66 73 6d 5f 66 72 65 | 65 2c 20 66 73 6d 5f 73 | fsm_fre|e, fsm_s|
|00004730| 69 7a 65 20 2d 20 66 69 | 78 65 64 20 73 69 7a 65 |ize - fi|xed size|
|00004740| 20 6d 65 6d 6f 72 79 20 | 61 6c 6c 6f 63 61 74 6f | memory |allocato|
|00004750| 72 0a 2e 53 48 20 53 59 | 4e 4f 50 53 49 53 0a 2e |r..SH SY|NOPSIS..|
|00004760| 4c 50 0a 2e 6e 66 0a 2e | 66 74 20 42 0a 23 69 6e |LP..nf..|ft B.#in|
|00004770| 63 6c 75 64 65 20 22 66 | 73 6d 61 2e 68 22 0a 2e |clude "f|sma.h"..|
|00004780| 4c 50 0a 2e 66 74 20 42 | 0a 66 73 6d 61 5f 68 20 |LP..ft B|.fsma_h |
|00004790| 66 73 6d 5f 63 72 65 61 | 74 65 28 20 73 69 7a 65 |fsm_crea|te( size|
|000047a0| 2c 20 73 6c 6f 74 73 5f | 70 65 72 5f 63 68 75 6e |, slots_|per_chun|
|000047b0| 6b 2c 20 66 6c 61 67 73 | 20 29 0a 75 6e 73 69 67 |k, flags| ).unsig|
|000047c0| 6e 65 64 20 73 69 7a 65 | 20 3b 0a 75 6e 73 69 67 |ned size| ;.unsig|
|000047d0| 6e 65 64 20 73 6c 6f 74 | 73 5f 70 65 72 5f 63 68 |ned slot|s_per_ch|
|000047e0| 75 6e 6b 20 3b 0a 69 6e | 74 20 66 6c 61 67 73 20 |unk ;.in|t flags |
|000047f0| 3b 0a 2e 4c 50 0a 2e 66 | 74 20 42 0a 76 6f 69 64 |;..LP..f|t B.void|
|00004800| 20 66 73 6d 5f 64 65 73 | 74 72 6f 79 28 20 68 61 | fsm_des|troy( ha|
|00004810| 6e 64 6c 65 20 29 0a 66 | 73 6d 61 5f 68 20 68 61 |ndle ).f|sma_h ha|
|00004820| 6e 64 6c 65 20 3b 0a 2e | 4c 50 0a 2e 66 74 20 42 |ndle ;..|LP..ft B|
|00004830| 0a 63 68 61 72 20 2a 66 | 73 6d 5f 61 6c 6c 6f 63 |.char *f|sm_alloc|
|00004840| 28 20 68 61 6e 64 6c 65 | 20 29 0a 66 73 6d 61 5f |( handle| ).fsma_|
|00004850| 68 20 68 61 6e 64 6c 65 | 20 3b 0a 2e 4c 50 0a 2e |h handle| ;..LP..|
|00004860| 66 74 20 42 0a 76 6f 69 | 64 20 66 73 6d 5f 66 72 |ft B.voi|d fsm_fr|
|00004870| 65 65 28 20 68 61 6e 64 | 6c 65 2c 20 70 74 72 20 |ee( hand|le, ptr |
|00004880| 29 0a 66 73 6d 61 5f 68 | 20 68 61 6e 64 6c 65 20 |).fsma_h| handle |
|00004890| 3b 0a 63 68 61 72 20 2a | 70 74 72 20 3b 0a 2e 4c |;.char *|ptr ;..L|
|000048a0| 50 0a 2e 66 74 20 42 0a | 75 6e 73 69 67 6e 65 64 |P..ft B.|unsigned|
|000048b0| 20 66 73 6d 5f 73 69 7a | 65 28 20 68 61 6e 64 6c | fsm_siz|e( handl|
|000048c0| 65 20 29 0a 66 73 6d 61 | 5f 68 20 68 61 6e 64 6c |e ).fsma|_h handl|
|000048d0| 65 20 3b 0a 2e 53 48 20 | 44 45 53 43 52 49 50 54 |e ;..SH |DESCRIPT|
|000048e0| 49 4f 4e 0a 54 68 65 20 | 66 69 78 65 64 2d 73 69 |ION.The |fixed-si|
|000048f0| 7a 65 20 6d 65 6d 6f 72 | 79 20 61 6c 6c 6f 63 61 |ze memor|y alloca|
|00004900| 74 6f 72 20 72 6f 75 74 | 69 6e 65 73 20 61 6c 6c |tor rout|ines all|
|00004910| 6f 63 61 74 65 20 61 6e | 64 20 66 72 65 65 20 6d |ocate an|d free m|
|00004920| 65 6d 6f 72 79 20 69 6e | 20 0a 66 69 78 65 64 2d |emory in| .fixed-|
|00004930| 73 69 7a 65 20 71 75 61 | 6e 74 69 74 69 65 73 2e |size qua|ntities.|
|00004940| 0a 54 68 65 20 62 61 73 | 69 63 20 6f 70 65 72 61 |.The bas|ic opera|
|00004950| 74 69 6f 6e 20 69 73 20 | 61 73 20 66 6f 6c 6c 6f |tion is |as follo|
|00004960| 77 73 3a 20 66 69 72 73 | 74 20 5c 66 42 66 73 6d |ws: firs|t \fBfsm|
|00004970| 5f 63 72 65 61 74 65 28 | 29 5c 66 52 0a 69 73 20 |_create(|)\fR.is |
|00004980| 63 61 6c 6c 65 64 20 74 | 6f 20 63 72 65 61 74 65 |called t|o create|
|00004990| 20 61 6e 20 61 6c 6c 6f | 63 61 74 6f 72 20 66 6f | an allo|cator fo|
|000049a0| 72 20 6f 62 6a 65 63 74 | 73 20 74 68 61 74 20 61 |r object|s that a|
|000049b0| 72 65 20 5c 66 49 73 69 | 7a 65 5c 66 52 0a 62 79 |re \fIsi|ze\fR.by|
|000049c0| 74 65 73 20 62 69 67 2e | 20 49 74 20 72 65 74 75 |tes big.| It retu|
|000049d0| 72 6e 73 20 61 6e 20 61 | 6c 6c 6f 63 61 74 6f 72 |rns an a|llocator|
|000049e0| 20 68 61 6e 64 6c 65 20 | 28 77 68 6f 73 65 20 74 | handle |(whose t|
|000049f0| 79 70 65 20 69 73 20 5c | 66 49 66 73 6d 61 5f 68 |ype is \|fIfsma_h|
|00004a00| 5c 66 52 29 2e 0a 45 76 | 65 72 79 74 69 6d 65 20 |\fR)..Ev|erytime |
|00004a10| 5c 66 42 66 73 6d 5f 61 | 6c 6c 6f 63 28 29 5c 66 |\fBfsm_a|lloc()\f|
|00004a20| 52 0a 69 73 20 63 61 6c | 6c 65 64 20 77 69 74 68 |R.is cal|led with|
|00004a30| 20 74 68 61 74 20 68 61 | 6e 64 6c 65 20 61 73 20 | that ha|ndle as |
|00004a40| 61 6e 20 61 72 67 75 6d | 65 6e 74 2c 20 69 74 20 |an argum|ent, it |
|00004a50| 77 69 6c 6c 20 72 65 74 | 75 72 6e 20 61 20 70 6f |will ret|urn a po|
|00004a60| 69 6e 74 65 72 0a 74 6f | 20 61 20 6d 65 6d 6f 72 |inter.to| a memor|
|00004a70| 79 20 62 6c 6f 63 6b 20 | 6f 66 20 5c 66 49 73 69 |y block |of \fIsi|
|00004a80| 7a 65 5c 66 52 20 62 79 | 74 65 73 2e 0a 2e 42 20 |ze\fR by|tes...B |
|00004a90| 66 73 6d 5f 61 6c 6c 6f | 63 28 29 0a 77 6f 72 6b |fsm_allo|c().work|
|00004aa0| 73 20 62 79 20 61 6c 6c | 6f 63 61 74 69 6e 67 20 |s by all|ocating |
|00004ab0| 62 69 67 20 63 68 75 6e | 6b 73 20 6f 66 20 6d 65 |big chun|ks of me|
|00004ac0| 6d 6f 72 79 2c 20 62 72 | 65 61 6b 69 6e 67 20 74 |mory, br|eaking t|
|00004ad0| 68 65 6d 20 69 6e 74 6f | 0a 62 6c 6f 63 6b 73 20 |hem into|.blocks |
|00004ae0| 6f 66 20 5c 66 49 73 69 | 7a 65 5c 66 52 20 62 79 |of \fIsi|ze\fR by|
|00004af0| 74 65 73 0a 61 6e 64 20 | 74 68 65 6e 20 61 6c 6c |tes.and |then all|
|00004b00| 6f 63 61 74 69 6e 67 20 | 66 72 6f 6d 20 74 68 61 |ocating |from tha|
|00004b10| 74 20 70 6f 6f 6c 20 6f | 66 20 62 6c 6f 63 6b 73 |t pool o|f blocks|
|00004b20| 2e 0a 2e 4c 50 0a 2e 42 | 20 66 73 6d 5f 63 72 65 |...LP..B| fsm_cre|
|00004b30| 61 74 65 28 29 0a 63 72 | 65 61 74 65 73 20 61 20 |ate().cr|eates a |
|00004b40| 6d 65 6d 6f 72 79 20 61 | 6c 6c 6f 63 61 74 6f 72 |memory a|llocator|
|00004b50| 20 66 6f 72 20 6f 62 6a | 65 63 74 73 20 6f 66 20 | for obj|ects of |
|00004b60| 5c 66 49 73 69 7a 65 5c | 66 52 20 62 79 74 65 73 |\fIsize\|fR bytes|
|00004b70| 2e 20 54 68 65 20 73 65 | 63 6f 6e 64 0a 61 72 67 |. The se|cond.arg|
|00004b80| 75 6d 65 6e 74 20 64 65 | 74 65 72 6d 69 6e 65 73 |ument de|termines|
|00004b90| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|00004ba0| 20 63 68 75 6e 6b 73 20 | 74 68 61 74 20 61 72 65 | chunks |that are|
|00004bb0| 20 61 6c 6c 6f 63 61 74 | 65 64 0a 62 65 63 61 75 | allocat|ed.becau|
|00004bc0| 73 65 20 69 74 20 64 65 | 66 69 6e 65 73 20 68 6f |se it de|fines ho|
|00004bd0| 77 20 6d 61 6e 79 20 6f | 62 6a 65 63 74 73 20 73 |w many o|bjects s|
|00004be0| 68 6f 75 6c 64 20 66 69 | 74 20 69 6e 20 61 20 63 |hould fi|t in a c|
|00004bf0| 68 75 6e 6b 2e 20 49 66 | 0a 5c 66 49 73 6c 6f 74 |hunk. If|.\fIslot|
|00004c00| 73 5f 70 65 72 5f 63 68 | 75 6e 6b 5c 66 52 20 69 |s_per_ch|unk\fR i|
|00004c10| 73 20 30 2c 20 5c 66 42 | 66 73 6d 5f 63 72 65 61 |s 0, \fB|fsm_crea|
|00004c20| 74 65 28 29 5c 66 52 20 | 77 69 6c 6c 20 75 73 65 |te()\fR |will use|
|00004c30| 20 61 20 64 65 66 61 75 | 6c 74 20 63 68 75 6e 6b | a defau|lt chunk|
|00004c40| 20 73 69 7a 65 2e 0a 54 | 68 65 20 5c 66 49 66 6c | size..T|he \fIfl|
|00004c50| 61 67 73 5c 66 52 20 61 | 72 67 75 6d 65 6e 74 20 |ags\fR a|rgument |
|00004c60| 69 73 20 66 6f 72 6d 65 | 64 20 62 79 20 4f 52 69 |is forme|d by ORi|
|00004c70| 6e 67 20 6f 6e 65 20 6f | 72 20 6d 6f 72 65 20 6f |ng one o|r more o|
|00004c80| 66 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 0a |f the fo|llowing.|
|00004c90| 63 6f 6e 73 74 61 6e 74 | 73 3a 0a 2e 54 50 20 32 |constant|s:..TP 2|
|00004ca0| 30 0a 2e 53 42 20 46 53 | 4d 5f 52 45 54 55 52 4e |0..SB FS|M_RETURN|
|00004cb0| 5f 45 52 52 4f 52 0a 64 | 65 74 65 72 6d 69 6e 65 |_ERROR.d|etermine|
|00004cc0| 73 20 74 68 65 20 62 65 | 68 61 76 69 6f 72 20 6f |s the be|havior o|
|00004cd0| 66 20 74 68 65 20 70 61 | 72 74 69 63 75 6c 61 72 |f the pa|rticular|
|00004ce0| 20 61 6c 6c 6f 63 61 74 | 6f 72 0a 69 6e 20 63 61 | allocat|or.in ca|
|00004cf0| 73 65 20 6f 66 20 61 20 | 5c 66 42 6d 61 6c 6c 6f |se of a |\fBmallo|
|00004d00| 63 28 29 5c 66 52 20 66 | 61 69 6c 75 72 65 2e 20 |c()\fR f|ailure. |
|00004d10| 57 68 65 6e 20 75 73 65 | 64 2c 20 74 68 65 20 63 |When use|d, the c|
|00004d20| 61 6c 6c 20 74 68 61 74 | 0a 66 61 69 6c 65 64 20 |all that|.failed |
|00004d30| 77 69 6c 6c 20 72 65 74 | 75 72 6e 20 61 20 76 61 |will ret|urn a va|
|00004d40| 6c 75 65 20 74 68 61 74 | 20 69 6e 64 69 63 61 74 |lue that| indicat|
|00004d50| 65 73 20 66 61 69 6c 75 | 72 65 0a 28 74 68 65 20 |es failu|re.(the |
|00004d60| 64 65 66 61 75 6c 74 20 | 62 65 68 61 76 69 6f 72 |default |behavior|
|00004d70| 20 69 73 20 74 6f 20 74 | 65 72 6d 69 6e 61 74 65 | is to t|erminate|
|00004d80| 20 74 68 65 20 70 72 6f | 63 65 73 73 29 0a 2e 54 | the pro|cess)..T|
|00004d90| 50 0a 2e 53 42 20 46 53 | 4d 5f 5a 45 52 4f 5f 41 |P..SB FS|M_ZERO_A|
|00004da0| 4c 4c 4f 43 0a 77 69 6c | 6c 20 63 61 75 73 65 20 |LLOC.wil|l cause |
|00004db0| 6d 65 6d 6f 72 79 20 62 | 6c 6f 63 6b 73 20 72 65 |memory b|locks re|
|00004dc0| 74 75 72 6e 65 64 20 66 | 72 6f 6d 20 74 68 65 20 |turned f|rom the |
|00004dd0| 73 70 65 63 69 66 69 65 | 64 20 61 6c 6c 6f 63 61 |specifie|d alloca|
|00004de0| 74 6f 72 0a 62 79 20 5c | 66 42 66 73 6d 5f 61 6c |tor.by \|fBfsm_al|
|00004df0| 6c 6f 63 28 29 5c 66 52 | 20 74 6f 20 62 65 20 7a |loc()\fR| to be z|
|00004e00| 65 72 6f 65 64 2e 0a 2e | 54 50 0a 2e 53 42 20 46 |eroed...|TP..SB F|
|00004e10| 53 4d 5f 5a 45 52 4f 5f | 46 52 45 45 0a 77 69 6c |SM_ZERO_|FREE.wil|
|00004e20| 6c 20 63 61 75 73 65 20 | 6d 65 6d 6f 72 79 20 62 |l cause |memory b|
|00004e30| 6c 6f 63 6b 73 20 72 65 | 74 75 72 6e 65 64 20 74 |locks re|turned t|
|00004e40| 6f 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |o the sp|ecified |
|00004e50| 61 6c 6c 6f 63 61 74 6f | 72 20 62 79 20 0a 5c 66 |allocato|r by .\f|
|00004e60| 42 66 73 6d 5f 66 72 65 | 65 28 29 5c 66 52 20 74 |Bfsm_fre|e()\fR t|
|00004e70| 6f 20 62 65 20 7a 65 72 | 6f 65 64 2e 0a 28 74 68 |o be zer|oed..(th|
|00004e80| 69 73 20 77 69 6c 6c 20 | 68 65 6c 70 20 63 61 74 |is will |help cat|
|00004e90| 63 68 20 72 65 66 65 72 | 65 6e 63 65 73 20 74 6f |ch refer|ences to|
|00004ea0| 20 61 6e 20 6f 62 6a 65 | 63 74 20 61 66 74 65 72 | an obje|ct after|
|00004eb0| 20 66 72 65 65 27 69 6e | 67 20 69 74 29 2e 0a 2e | free'in|g it)...|
|00004ec0| 54 50 0a 2e 53 42 20 46 | 53 4d 5f 5a 45 52 4f 5f |TP..SB F|SM_ZERO_|
|00004ed0| 44 45 53 54 52 4f 59 0a | 77 69 6c 6c 20 63 61 75 |DESTROY.|will cau|
|00004ee0| 73 65 20 61 6c 6c 20 6d | 65 6d 6f 72 79 20 61 73 |se all m|emory as|
|00004ef0| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 74 68 |sociated| with th|
|00004f00| 65 20 61 6c 6c 6f 63 61 | 74 6f 72 20 74 6f 20 62 |e alloca|tor to b|
|00004f10| 65 20 7a 65 72 6f 65 64 | 0a 77 68 65 6e 20 74 68 |e zeroed|.when th|
|00004f20| 65 20 61 6c 6c 6f 63 61 | 74 6f 72 20 69 73 20 64 |e alloca|tor is d|
|00004f30| 65 73 74 72 6f 79 65 64 | 2e 0a 2e 4c 50 0a 54 68 |estroyed|...LP.Th|
|00004f40| 65 20 63 6f 6e 73 74 61 | 6e 74 20 5c 66 42 46 53 |e consta|nt \fBFS|
|00004f50| 4d 5f 4e 4f 46 4c 41 47 | 53 5c 66 52 20 63 61 6e |M_NOFLAG|S\fR can|
|00004f60| 20 62 65 20 75 73 65 64 | 20 74 6f 20 73 70 65 63 | be used| to spec|
|00004f70| 69 66 79 20 6e 6f 20 66 | 6c 61 67 73 2e 0a 2e 4c |ify no f|lags...L|
|00004f80| 50 0a 2e 42 20 66 73 6d | 5f 64 65 73 74 72 6f 79 |P..B fsm|_destroy|
|00004f90| 28 29 0a 64 65 73 74 72 | 6f 79 73 20 61 6e 20 61 |().destr|oys an a|
|00004fa0| 6c 6c 6f 63 61 74 6f 72 | 20 61 6e 64 20 66 72 65 |llocator| and fre|
|00004fb0| 65 73 20 61 6c 6c 20 6d | 65 6d 6f 72 79 20 61 6c |es all m|emory al|
|00004fc0| 6c 6f 63 61 74 65 64 20 | 62 79 20 69 74 2e 0a 2e |located |by it...|
|00004fd0| 4c 50 0a 2e 42 20 66 73 | 6d 5f 61 6c 6c 6f 63 28 |LP..B fs|m_alloc(|
|00004fe0| 29 0a 61 6c 6c 6f 63 61 | 74 65 73 20 61 20 6d 65 |).alloca|tes a me|
|00004ff0| 6d 6f 72 79 20 62 6c 6f | 63 6b 20 66 72 6f 6d 20 |mory blo|ck from |
|00005000| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 61 6c |the spec|ified al|
|00005010| 6c 6f 63 61 74 6f 72 2e | 20 54 68 65 20 62 6c 6f |locator.| The blo|
|00005020| 63 6b 0a 77 69 6c 6c 20 | 62 65 20 70 72 6f 70 65 |ck.will |be prope|
|00005030| 72 6c 79 20 61 6c 69 67 | 6e 65 64 2e 0a 2e 4c 50 |rly alig|ned...LP|
|00005040| 0a 2e 42 20 66 73 6d 5f | 66 72 65 65 28 29 0a 72 |..B fsm_|free().r|
|00005050| 65 74 75 72 6e 73 20 61 | 20 62 6c 6f 63 6b 20 74 |eturns a| block t|
|00005060| 6f 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |o the sp|ecified |
|00005070| 61 6c 6c 6f 63 61 74 6f | 72 2e 0a 2e 4c 50 0a 2e |allocato|r...LP..|
|00005080| 42 20 66 73 6d 5f 73 69 | 7a 65 28 29 0a 72 65 74 |B fsm_si|ze().ret|
|00005090| 75 72 6e 73 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |urns the| size of|
|000050a0| 20 62 6c 6f 63 6b 73 20 | 74 68 61 74 20 61 72 65 | blocks |that are|
|000050b0| 20 68 61 6e 64 65 64 20 | 6f 75 74 20 62 79 20 74 | handed |out by t|
|000050c0| 68 65 20 73 70 65 63 69 | 66 69 65 64 20 61 6c 6c |he speci|fied all|
|000050d0| 6f 63 61 74 6f 72 2e 0a | 2e 53 48 20 52 45 54 55 |ocator..|.SH RETU|
|000050e0| 52 4e 20 56 41 4c 55 45 | 53 0a 2e 4c 50 0a 2e 42 |RN VALUE|S..LP..B|
|000050f0| 20 66 73 6d 5f 63 72 65 | 61 74 65 28 29 0a 72 65 | fsm_cre|ate().re|
|00005100| 74 75 72 6e 73 20 61 6e | 20 61 6c 6c 6f 63 61 74 |turns an| allocat|
|00005110| 6f 72 20 68 61 6e 64 6c | 65 2c 20 6f 72 0a 2e 53 |or handl|e, or..S|
|00005120| 4d 20 4e 55 4c 4c 0a 69 | 66 20 74 68 65 20 72 65 |M NULL.i|f the re|
|00005130| 71 75 65 73 74 20 66 61 | 69 6c 73 2e 0a 2e 4c 50 |quest fa|ils...LP|
|00005140| 0a 2e 42 20 66 73 6d 5f | 61 6c 6c 6f 63 28 29 0a |..B fsm_|alloc().|
|00005150| 72 65 74 75 72 6e 73 20 | 61 20 70 6f 69 6e 74 65 |returns |a pointe|
|00005160| 72 20 74 6f 20 61 20 6d | 65 6d 6f 72 79 20 62 6c |r to a m|emory bl|
|00005170| 6f 63 6b 20 6f 66 20 74 | 68 65 20 61 70 70 72 6f |ock of t|he appro|
|00005180| 70 72 69 61 74 65 20 73 | 69 7a 65 20 6f 72 0a 2e |priate s|ize or..|
|00005190| 53 4d 20 4e 55 4c 4c 0a | 69 66 20 74 68 65 20 72 |SM NULL.|if the r|
|000051a0| 65 71 75 65 73 74 20 66 | 61 69 6c 73 2e 0a 2e 53 |equest f|ails...S|
|000051b0| 48 20 4e 4f 54 45 53 0a | 2e 42 20 66 73 6d 5f 61 |H NOTES.|.B fsm_a|
|000051c0| 6c 6c 6f 63 28 29 2c 0a | 2e 42 20 66 73 6d 5f 66 |lloc(),.|.B fsm_f|
|000051d0| 72 65 65 28 29 0a 61 6e | 64 0a 2e 42 20 66 73 6d |ree().an|d..B fsm|
|000051e0| 5f 73 69 7a 65 28 29 0a | 61 72 65 20 6d 61 63 72 |_size().|are macr|
|000051f0| 6f 73 2c 20 73 6f 20 74 | 68 65 20 26 20 6f 70 65 |os, so t|he & ope|
|00005200| 72 61 74 6f 72 20 63 61 | 6e 6e 6f 74 20 62 65 20 |rator ca|nnot be |
|00005210| 61 70 70 6c 69 65 64 20 | 74 6f 20 74 68 65 6d 0a |applied |to them.|
|00005220| 28 69 66 20 74 68 61 74 | 20 69 73 20 6e 65 65 64 |(if that| is need|
|00005230| 65 64 2c 20 79 6f 75 20 | 63 61 6e 20 75 73 65 20 |ed, you |can use |
|00005240| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 73 0a 2e 42 |the func|tions..B|
|00005250| 20 5f 66 73 6d 5f 61 6c | 6c 6f 63 28 29 0a 61 6e | _fsm_al|loc().an|
|00005260| 64 0a 2e 42 20 5f 66 73 | 6d 5f 66 72 65 65 28 29 |d..B _fs|m_free()|
|00005270| 0a 74 68 61 74 20 70 65 | 72 66 6f 72 6d 20 74 68 |.that pe|rform th|
|00005280| 65 20 73 61 6d 65 20 6a | 6f 62 20 61 73 20 74 68 |e same j|ob as th|
|00005290| 65 20 6d 61 63 72 6f 73 | 29 2e 0a 65 65 20 6c 69 |e macros|)..ee li|
|000052a0| 73 74 20 65 78 68 61 75 | 73 74 65 64 3b 20 61 6c |st exhau|sted; al|
|000052b0| 6c 6f 63 61 74 65 20 61 | 20 6e 65 77 20 63 68 75 |locate a| new chu|
|000052c0| 6e 6b 0a 09 09 20 2a 2f | 0a 09 09 63 68 61 72 20 |nk... */|...char |
|000052d0| 2a 73 6c 6f 74 73 20 3b | 0a 09 09 75 6e 69 6f 6e |*slots ;|...union|
|000052e0| 20 5f 5f 66 73 6d 61 5f | 63 68 75 6e 6b 5f 68 65 | __fsma_|chunk_he|
|000052f0| 61 64 65 72 20 2a 63 68 | 70 20 3b 0a 0a 09 09 63 |ader *ch|p ;....c|
|00005300| 68 70 20 3d 20 43 48 55 | 4e 4b 5f 48 45 41 44 45 |hp = CHU|NK_HEADE|
|00005310| 52 28 20 6d 61 6c 6c 6f | 63 28 20 66 70 2d 3e 63 |R( mallo|c( fp->c|
|00005320| 68 75 6e 6b 5f 73 69 7a | 65 20 29 20 29 20 3b 0a |hunk_siz|e ) ) ;.|
|00005330| 09 09 69 66 20 28 20 63 | 68 70 20 3d 3d 20 4e 55 |..if ( c|hp == NU|
|00005340| 4c 4c 20 29 0a 09 09 09 | 69 66 20 28 20 66 70 2d |LL )....|if ( fp-|
|00005350| 3e 66 6c 61 67 73 20 26 | 20 46 53 4d 5f 52 45 54 |>flags &| FSM_RET|
|00005360| 55 52 4e 5f 45 52 52 4f | 52 20 29 0a 09 09 09 09 |URN_ERRO|R ).....|
|00005370| 72 65 74 75 72 6e 28 20 | 4e 55 4c 4c 20 29 20 3b |return( |NULL ) ;|
|00005380| 0a 09 09 09 65 6c 73 65 | 0a 09 09 09 09 74 65 72 |....else|.....ter|
|00005390| 6d 69 6e 61 74 65 28 20 | 22 46 53 4d 41 20 66 73 |minate( |"FSMA fs|
|000053a0| 6d 5f 61 6c 6c 6f 63 3a | 20 6d 61 6c 6c 6f 63 20 |m_alloc:| malloc |
|000053b0| 66 61 69 6c 65 64 5c 6e | 22 20 29 20 3b 0a 0a 23 |failed\n|" ) ;..#|
|000053c0| 69 66 64 65 66 20 44 45 | 42 55 47 0a 09 09 66 70 |ifdef DE|BUG...fp|
|000053d0| 72 69 6e 74 66 28 20 73 | 74 64 65 72 72 2c 20 22 |rintf( s|tderr, "|
|000053e0| 41 6c 6c 6f 63 61 74 69 | 6e 67 20 63 68 75 6e 6b |Allocati|ng chunk|
|000053f0| 20 25 70 5c 6e 22 2c 20 | 63 68 75 6e 6b 20 29 20 | %p\n", |chunk ) |
|00005400| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005480| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005600| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005680| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005800| 20 6e 65 78 74 5f 66 72 | 65 65 20 3b 0a 09 5f 5f | next_fr|ee ;..__|
|00005810| 66 73 6d 61 5f 70 6f 69 | 6e 74 65 72 20 74 65 6d |fsma_poi|nter tem|
|00005820| 70 20 3b 0a 09 75 6e 73 | 69 67 6e 65 64 20 73 6c |p ;..uns|igned sl|
|00005830| 6f 74 73 5f 69 6e 5f 63 | 68 75 6e 6b 20 3b 0a 09 |ots_in_c|hunk ;..|
|00005840| 75 6e 73 69 67 6e 65 64 | 20 73 6c 6f 74 5f 73 69 |unsigned| slot_si|
|00005850| 7a 65 20 3b 0a 09 75 6e | 73 69 67 6e 65 64 20 63 |ze ;..un|signed c|
|00005860| 68 75 6e 6b 5f 73 69 7a | 65 20 3b 0a 09 69 6e 74 |hunk_siz|e ;..int|
|00005870| 20 66 6c 61 67 73 20 3b | 0a 09 69 6e 74 20 69 73 | flags ;|..int is|
|00005880| 5f 69 6e 6c 69 6e 65 64 | 20 3b 09 09 09 09 09 09 |_inlined| ;......|
|00005890| 2f 2a 20 68 65 61 64 65 | 72 20 69 73 20 69 6e 6c |/* heade|r is inl|
|000058a0| 69 6e 65 64 20 28 62 6f | 6f 6c 65 61 6e 29 09 2a |ined (bo|olean).*|
|000058b0| 2f 0a 7d 20 3b 0a 0a 74 | 79 70 65 64 65 66 20 73 |/.} ;..t|ypedef s|
|000058c0| 74 72 75 63 74 20 5f 5f | 66 73 6d 61 5f 68 65 61 |truct __|fsma_hea|
|000058d0| 64 65 72 20 2a 66 73 6d | 61 5f 68 20 3b 0a 0a 2f |der *fsm|a_h ;../|
|000058e0| 2a 0a 20 2a 20 46 6c 61 | 67 73 0a 20 2a 2f 0a 23 |*. * Fla|gs. */.#|
|000058f0| 64 65 66 69 6e 65 20 46 | 53 4d 5f 4e 4f 46 4c 41 |define F|SM_NOFLA|
|00005900| 47 53 09 09 09 09 09 30 | 78 30 0a 23 64 65 66 69 |GS.....0|x0.#defi|
|00005910| 6e 65 20 46 53 4d 5f 52 | 45 54 55 52 4e 5f 45 52 |ne FSM_R|ETURN_ER|
|00005920| 52 4f 52 09 09 09 30 78 | 31 0a 23 64 65 66 69 6e |ROR...0x|1.#defin|
|00005930| 65 20 46 53 4d 5f 5a 45 | 52 4f 5f 41 4c 4c 4f 43 |e FSM_ZE|RO_ALLOC|
|00005940| 09 09 09 09 30 78 32 0a | 23 64 65 66 69 6e 65 20 |....0x2.|#define |
|00005950| 46 53 4d 5f 5a 45 52 4f | 5f 46 52 45 45 09 09 09 |FSM_ZERO|_FREE...|
|00005960| 09 30 78 34 0a 23 64 65 | 66 69 6e 65 20 46 53 4d |.0x4.#de|fine FSM|
|00005970| 5f 5a 45 52 4f 5f 44 45 | 53 54 52 4f 59 09 09 09 |_ZERO_DE|STROY...|
|00005980| 30 78 38 0a 0a 0a 2f 2a | 0a 20 2a 20 49 4e 54 45 |0x8.../*|. * INTE|
|00005990| 52 46 41 43 45 0a 20 2a | 2f 0a 0a 23 69 66 64 65 |RFACE. *|/..#ifde|
|000059a0| 66 20 5f 5f 41 52 47 53 | 0a 23 75 6e 64 65 66 20 |f __ARGS|.#undef |
|000059b0| 5f 5f 41 52 47 53 0a 23 | 65 6e 64 69 66 0a 0a 23 |__ARGS.#|endif..#|
|000059c0| 69 66 64 65 66 20 50 52 | 4f 54 4f 54 59 50 45 53 |ifdef PR|OTOTYPES|
|000059d0| 0a 23 20 20 64 65 66 69 | 6e 65 20 5f 5f 41 52 47 |.# defi|ne __ARG|
|000059e0| 53 28 20 73 20 29 20 20 | 20 20 20 20 20 20 20 20 |S( s ) | |
|000059f0| 20 20 20 20 20 73 0a 23 | 65 6c 73 65 0a 23 20 20 | s.#|else.# |
|00005a00| 64 65 66 69 6e 65 20 5f | 5f 41 52 47 53 28 20 73 |define _|_ARGS( s|
|00005a10| 20 29 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | ) | |
|00005a20| 20 28 29 0a 23 65 6e 64 | 69 66 0a 0a 66 73 6d 61 | ().#end|if..fsma|
|00005a30| 5f 68 20 66 73 6d 5f 63 | 72 65 61 74 65 20 5f 5f |_h fsm_c|reate __|
|00005a40| 41 52 47 53 28 20 28 20 | 75 6e 73 69 67 6e 65 64 |ARGS( ( |unsigned|
|00005a50| 20 73 69 7a 65 2c 20 75 | 6e 73 69 67 6e 65 64 20 | size, u|nsigned |
|00005a60| 73 6c 6f 74 73 2c 20 69 | 6e 74 20 66 6c 61 67 73 |slots, i|nt flags|
|00005a70| 20 29 20 29 20 3b 0a 76 | 6f 69 64 20 66 73 6d 5f | ) ) ;.v|oid fsm_|
|00005a80| 64 65 73 74 72 6f 79 20 | 5f 5f 41 52 47 53 28 20 |destroy |__ARGS( |
|00005a90| 28 20 66 73 6d 61 5f 68 | 20 68 61 6e 64 6c 65 20 |( fsma_h| handle |
|00005aa0| 29 20 29 20 3b 0a 63 68 | 61 72 20 2a 5f 66 73 6d |) ) ;.ch|ar *_fsm|
|00005ab0| 5f 61 6c 6c 6f 63 20 5f | 5f 41 52 47 53 28 20 28 |_alloc _|_ARGS( (|
|00005ac0| 20 66 73 6d 61 5f 68 20 | 68 61 6e 64 6c 65 20 29 | fsma_h |handle )|
|00005ad0| 20 29 20 3b 0a 76 6f 69 | 64 20 5f 66 73 6d 5f 66 | ) ;.voi|d _fsm_f|
|00005ae0| 72 65 65 20 5f 5f 41 52 | 47 53 28 20 28 20 66 73 |ree __AR|GS( ( fs|
|00005af0| 6d 61 5f 68 20 68 61 6e | 64 6c 65 2c 20 63 68 61 |ma_h han|dle, cha|
|00005b00| 72 20 2a 70 74 72 20 29 | 20 29 20 3b 0a 0a 23 64 |r *ptr )| ) ;..#d|
|00005b10| 65 66 69 6e 65 20 66 73 | 6d 5f 61 6c 6c 6f 63 28 |efine fs|m_alloc(|
|00005b20| 20 66 73 6d 61 20 29 09 | 09 09 09 09 09 09 09 09 | fsma ).|........|
|00005b30| 09 09 09 09 09 09 09 5c | 0a 09 28 09 09 09 09 09 |.......\|..(.....|
|00005b40| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00005b50| 09 09 5c 0a 09 09 28 20 | 21 20 28 66 73 6d 61 29 |..\...( |! (fsma)|
|00005b60| 2d 3e 6e 65 78 74 5f 66 | 72 65 65 20 7c 7c 20 28 |->next_f|ree || (|
|00005b70| 66 73 6d 61 29 2d 3e 66 | 6c 61 67 73 20 26 20 46 |fsma)->f|lags & F|
|00005b80| 53 4d 5f 5a 45 52 4f 5f | 41 4c 4c 4f 43 20 29 20 |SM_ZERO_|ALLOC ) |
|00005b90| 20 20 20 20 20 20 20 20 | 5c 0a 09 09 09 3f 20 5f | |\....? _|
|00005ba0| 66 73 6d 5f 61 6c 6c 6f | 63 28 20 66 73 6d 61 20 |fsm_allo|c( fsma |
|00005bb0| 29 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |).......|........|
|00005bc0| 5c 0a 09 09 09 3a 20 28 | 28 66 73 6d 61 29 2d 3e |\....: (|(fsma)->|
|00005bd0| 74 65 6d 70 20 3d 20 28 | 66 73 6d 61 29 2d 3e 6e |temp = (|fsma)->n|
|00005be0| 65 78 74 5f 66 72 65 65 | 2c 20 20 20 20 20 20 20 |ext_free|, |
|00005bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c00| 20 20 20 20 5c 0a 09 09 | 09 09 28 66 73 6d 61 29 | \...|..(fsma)|
|00005c10| 2d 3e 6e 65 78 74 5f 66 | 72 65 65 20 3d 20 2a 28 |->next_f|ree = *(|
|00005c20| 5f 5f 66 73 6d 61 5f 70 | 6f 69 6e 74 65 72 20 2a |__fsma_p|ointer *|
|00005c30| 29 20 28 66 73 6d 61 29 | 2d 3e 6e 65 78 74 5f 66 |) (fsma)|->next_f|
|00005c40| 72 65 65 2c 20 20 5c 0a | 09 09 09 09 28 63 68 61 |ree, \.|....(cha|
|00005c50| 72 20 2a 29 20 28 66 73 | 6d 61 29 2d 3e 74 65 6d |r *) (fs|ma)->tem|
|00005c60| 70 29 09 09 09 09 09 09 | 09 09 09 09 09 09 09 5c |p)......|.......\|
|00005c70| 0a 09 29 0a 0a 23 64 65 | 66 69 6e 65 20 66 73 6d |..)..#de|fine fsm|
|00005c80| 5f 66 72 65 65 28 20 66 | 73 6d 61 2c 20 70 20 29 |_free( f|sma, p )|
|00005c90| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 09 5c |........|.......\|
|00005ca0| 0a 09 09 09 69 66 20 28 | 20 28 66 73 6d 61 29 2d |....if (| (fsma)-|
|00005cb0| 3e 66 6c 61 67 73 20 26 | 20 46 53 4d 5f 5a 45 52 |>flags &| FSM_ZER|
|00005cc0| 4f 5f 46 52 45 45 20 29 | 09 09 09 09 09 09 09 09 |O_FREE )|........|
|00005cd0| 09 5c 0a 09 09 09 09 5f | 66 73 6d 5f 66 72 65 65 |.\....._|fsm_free|
|00005ce0| 28 20 66 73 6d 61 2c 20 | 70 20 29 09 3b 09 09 09 |( fsma, |p ).;...|
|00005cf0| 09 09 09 09 09 09 09 09 | 09 09 5c 0a 09 09 09 65 |........|..\....e|
|00005d00| 6c 73 65 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |lse.....|........|
|00005d10| 09 09 09 09 09 09 09 5c | 0a 09 09 09 09 28 66 73 |.......\|.....(fs|
|00005d20| 6d 61 29 2d 3e 74 65 6d | 70 20 3d 20 28 70 29 2c |ma)->tem|p = (p),|
|00005d30| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 5c 0a |........|......\.|
|00005d40| 09 09 09 09 2a 28 5f 5f | 66 73 6d 61 5f 70 6f 69 |....*(__|fsma_poi|
|00005d50| 6e 74 65 72 20 2a 29 20 | 28 66 73 6d 61 29 2d 3e |nter *) |(fsma)->|
|00005d60| 74 65 6d 70 20 3d 20 28 | 66 73 6d 61 29 2d 3e 6e |temp = (|fsma)->n|
|00005d70| 65 78 74 5f 66 72 65 65 | 2c 20 09 09 5c 0a 09 09 |ext_free|, ..\...|
|00005d80| 09 09 28 66 73 6d 61 29 | 2d 3e 6e 65 78 74 5f 66 |..(fsma)|->next_f|
|00005d90| 72 65 65 20 3d 20 28 66 | 73 6d 61 29 2d 3e 74 65 |ree = (f|sma)->te|
|00005da0| 6d 70 0a 0a 23 64 65 66 | 69 6e 65 20 66 73 6d 5f |mp..#def|ine fsm_|
|00005db0| 73 69 7a 65 28 20 66 73 | 6d 61 20 29 09 09 09 28 |size( fs|ma )...(|
|00005dc0| 66 73 6d 61 29 2d 3e 73 | 6c 6f 74 5f 73 69 7a 65 |fsma)->s|lot_size|
|00005dd0| 0a 0a 23 65 6e 64 69 66 | 20 09 2f 2a 20 5f 5f 46 |..#endif| ./* __F|
|00005de0| 53 4d 41 5f 48 20 2a 2f | 0a 0a 5f 69 6e 5f 63 68 |SMA_H */|.._in_ch|
|00005df0| 75 6e 6b 20 3d 20 6e 73 | 6c 6f 74 73 20 3b 0a 09 |unk = ns|lots ;..|
|00005e00| 2e 2f 69 6d 70 6c 2e 68 | 00 00 00 00 00 00 00 00 |./impl.h|........|
|00005e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e60| 00 00 00 00 20 20 20 36 | 30 30 20 00 20 32 33 34 |.... 6|00 . 234|
|00005e70| 32 31 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |21 . | 0 . |
|00005e80| 20 20 20 31 30 37 34 20 | 20 35 32 37 37 34 30 37 | 1074 | 5277407|
|00005e90| 32 32 32 20 20 20 35 33 | 37 31 00 20 00 00 00 00 |222 53|71. ....|
|00005ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+